difference static method

Period difference(
  1. LocalDate end,
  2. LocalDate start
)

Subtracts one date from another, returning the result as a Period with units of years, months and days.

This is simply a convenience method for calling Period.Between(LocalDate,LocalDate). The calendar systems of the two dates must be the same.

  • end: The date to subtract from
  • start: The date to subtract

Returns: The result of subtracting one date from another.

Implementation

static Period difference(LocalDate end, LocalDate start) => Period.differenceBetweenDates(start, end);