difference static method

Time difference(
  1. OffsetDateTime end,
  2. OffsetDateTime start
)

Subtracts one offset date and time from another, returning an elapsed duration. Equivalent to: end - start.

  • end: The offset date and time value to subtract from; if this is later than start then the result will be positive.
  • start: The offset date and time to subtract from end.

Returns: The elapsed duration from start to end.

Implementation

static Time difference(OffsetDateTime end, OffsetDateTime start) => end.timeSince(start);