max static method

Returns the later date of the given two.

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

Returns: The later date of x or y.

  • ArgumentException: The two dates have different calendar systems.

Implementation

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