min static method

Returns the earlier date/time of the given two.

  • x: The first date/time to compare.
  • y: The second date/time to compare.

Returns: The earlier date/time of x or y.

  • ArgumentError: The two date/times have different calendar systems.

Implementation

static LocalDateTime min(LocalDateTime x, LocalDateTime y) {
  Preconditions.checkArgument(x.calendar == y.calendar, 'y', "Only values with the same calendar system can be compared");
  return x < y ? x : y;
}