code: public static long randomBefore(TemporalField field, long before) {
      long min = field.range().getMinimum();
      long max = field.range().getMaximum();
      checkArgument(before > min, "Before must be after %s", min);
      checkArgument(before <= max, "Before must be on or before %s", max);
      return randomLong(min, before);
    }
docs: Returns a random valid value for the given {@link TemporalField} between <code>
  TemporalField.range().min()</code> and <code>before</code>. For example, <code>
  randomBefore({@link ChronoField#HOUR_OF_DAY}, 13)</code> will return a random value between
  0-12.
  
  @param field the {@link TemporalField} to return a valid value for
  @param before the value that the returned value must be before
  @return the random value
  @throws IllegalArgumentException if before is after <code>
  TemporalField.range().max()
  </code> or if before is on or before <code>TemporalField.range().min()</code>