How this calculator defines the difference
Time since measures from a past target to the device clock. Time until measures from the device clock to a future target. Between two dates uses the entered reference and target; its sign is defined by:
signed difference = target timestamp − reference timestamp
The absolute timestamp difference produces fixed-duration totals. One week is 7 × 24 hours, one day is 24 hours, and smaller units are exact multiples of seconds. Leap seconds are not represented by JavaScript dates.
The calendar breakdown answers a different question. It takes the largest complete years and months from the earlier date while preserving the original day-of-month anchor, clamping only when that day does not exist. It then counts local calendar days and the remaining clock time. Thus January 31 to March 31 is two months, and February 29, 2020 to February 28, 2021 is one calendar year under this end-of-month convention.
Both entries are interpreted in the displayed device time zone. Totals measure real elapsed time, so a local midnight-to-midnight interval may contain 23 or 25 hours across a daylight-saving change. For an international event, convert its published time to your device zone before entering it.
