date-fns
4.4.0 · 29 May 2026MIT126.2M / weekRepositorynpmAtom feed
Upgrading date-fns From 3.1.0 to 3.6.0
6 releases in betweenevery note read
Release by release
- New
- New
Added the
constructNowfunction that creates the current date using the passed reference date's constructor. - Fixed
- Fixed
- Fixed
- New
- New
- Fixed
Fixed DST issue in
getOverlappingDaysInIntervals, resulting in an inconsistent number of days returned for intervals starting and ending in different DST periods. - Fixed
Fixed functions incorrectly using
truncinstead ofround. The bug was introduced in v3.3.0. The affected functions:differenceInCalendarDays,differenceInCalendarISOWeeks,differenceInCalendarWeeks,getISOWeek,getWeek, andgetISOWeeksInYear.
- Fixed
- New
Added missing
yearsToDaysto the FP submodule. - New
- Fixed
Fixed the bug in
getOverlappingDaysInIntervalscaused by incorrect sorting of interval components that led to 0 for timestamps of different lengths. - Fixed
Fixed bugs when working with negative numbers caused by using
Math.floor(-1.1→-2) instead ofMath.trunc(-1.1→-1). Most of the conversion functions (i.e.,hoursToMinutes) were affected when passing some negative fractional input. Also, some other functions that could be possibly affected by unfortunate timezone/date combinations were fixed.
- New
- New
Added exports of
format,lightFormat, andparseinternals that enable 3rd-parties to consume those. - Fixed
Fixed types compatibility with Lodash's
flowand fp-ts'spipe. - Fixed
- New
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.