Skip to content

v1.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 22 Nov 12:09
· 1 commit to main since this release

A batch of community fixes 🙌 — thank you @jayhemnani9910, @pcbeingused333, @imsurya26!

⚠️ Behavior changes

  • diffDays / diffWeeks count calendar days across DST (#93): diffDays("2026-03-15", "2026-03-01") is now 14 in DST zones (was 13). Days are counted on the device's wall clock, like addDay and diffMonths, so two instants exactly 14×24h apart across a fall-back now count 13 days. diff() follows suit. diffHours stays elapsed time.
  • diffMonths respects time of day (#104): 2024-03-15T09:00 vs 2024-02-15T10:00 is 0 months (a few hours short), was 1. Date-only inputs are unchanged. Flows into diffYears and diff().

Fixes

  • nearestDay with month/week/year constraints no longer returns a day from the previous period (#91)
  • dayOfYear counts calendar days across skipped dates (e.g. Pacific/Apia 2011) (#97)
  • hourStart/hourEnd/minuteStart/minuteEnd stay in the same occurrence of a repeated (fall-back) hour (#102)
  • diffWeeks(date) / diffWeeks(null, date) type-check, comparing with now (#101)