date-fns
4.4.0 · 29 May 2026MIT126.2M / weekRepositorynpmAtom feed
Upgrading date-fns From 1.28.5 to 4.4.0
70 releases in betweennotes for 66
- 21+
- changes to make
- 0
- advisories fixed
- 119+
- new
- 144+
- fixes
Counted from 66 of 70 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking4.4.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
- Breaking3.0.0
Release by release
- Breaking
Removed CDN source maps to reduce the package size. If you rely on them, please switch to the new
@date-fns/cdnpackage that still includes them. - Deprecated
DEPRECATED: The
date-fnsCDN scripts are now deprecated and will be removed in the next major release. Please switch to the new@date-fns/cdnpackage for CDN usage.
- Breaking
- Fixed
Fixed missing modularized optimization fallback (for Next.js and others). See #4193.
- Fixed
Fixed
ptlocale first day of week to be Sunday. See #4195 - Fixed
Fixed
zh-CN,zh-HK, andzh-TWlocale month parsing for October, November, and December. See #4194
- Fixed
- Fixed
Fixed type definitions missing in v4.2.0 due to TypeScript misconfiguration.
- Fixed
- New
Added Temporal API references to the JSDoc annotations of
add,addBusinessDays, andaddDays.
- New
- Breaking
This release contains a bunch of types changes that should not affect the library's expected usage. The changes are primarily internal and nuanced, so rather than listing them here, I recommend you run the type checker after the upgrade. If there are unfixable problems, please open an issue.
- Breaking
The package is now ESM-first. CommonJS is still supported, and it should not affect most users, but it might break in certain environments. If you encounter any issues, please report them.
- New
Added time zones support via
@date-fns/tz'sTZDateclass andtzhelper function. See its README for the details about the API. - New
All relevant functions now accept the context
inoption, which allows to specify the time zone to make the calculations in. If the function also returns a date, it will be in the specified time zone: - Fixed
Fixed CDN build compatibility with jQuery and other tools that expose
$by properly wrapping the code in an IIFE.
- Breaking
- New
- New
Added the
constructNowfunction that creates the current date using the passed reference date's constructor. - Fixed
- Fixed
- Fixed
4 other lines we could not sort, mostly version bumps
- 4.0.0
The function arguments, as well as
Interval'sstartandend, now can be of different types, allowing you to mixUTCDate,TZDate,Date, and other extensions, as well as primitives (strings and numbers). - 2.11.0
Change date format to meet the national standard (GB/T 7408-2005).
- 2.11.0
Improve
ordinalNumberfunction behavior. - 2.0.0
Pre-releases changelog (if you're upgrading from alpha or beta): gist.github.com/kossnocorp/a307a464760b405bb78e…
24 internal lines (docs, tests, tooling) left out.
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.