difference static method

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

Subtracts one date/time from another, returning the result as a Period.

This is simply a convenience method for calling Period.Between(LocalDateTime,LocalDateTime). The calendar systems of the two date/times must be the same.

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

Returns: The result of subtracting one date/time from another.

Implementation

static Period difference(LocalDateTime end, LocalDateTime start) =>
    end.periodSince(start);