date-fns breaking changes
Every breaking API change we have recorded in date-fns on npm: 403 breaking changes in 1 version. Below are its newest version, removals and renames first, each with its source.
Newest change September 16, 2024

On this page
4.0.0
- Behavior changed
The package is now published ESM-first. CommonJS still works but may break in some environments, so check your module setup if you hit problems. github.com - Signature changed
Types changed in ways that mainly affect code that explicitly uses date-fns internal types. Run the TypeScript type checker after upgrading and fix any errors it reports. github.com - Signature changed
add
Was function add<DateType extends Date>(date: DateType | number | string, duration: Duration): DateType; now function add<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, duration: Duration, options?... npmjs.com - Signature changed
addBusinessDays
Was function addBusinessDays<DateType extends Date>(date: DateType | number | string, amount: number): DateType; now function addBusinessDays<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, amount... npmjs.com - Signature changed
addDays
Was function addDays<DateType extends Date>(date: DateType | number | string, amount: number): DateType; now function addDays<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, amount: number, options?... npmjs.com - Signature changed
addHours
Was function addHours<DateType extends Date>(date: DateType | number | string, amount: number): DateType; now function addHours<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, amount: number, options?... npmjs.com - Signature changed
addISOWeekYears
Was function addISOWeekYears<DateType extends Date>(date: DateType | number | string, amount: number): DateType; now function addISOWeekYears<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, amount... npmjs.com - Signature changed
addMilliseconds
Was function addMilliseconds<DateType extends Date>(date: DateType | number | string, amount: number): DateType; now function addMilliseconds<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, amount... npmjs.com - Signature changed
addMinutes
Was function addMinutes<DateType extends Date>(date: DateType | number | string, amount: number): DateType; now function addMinutes<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, amount: number... npmjs.com - Signature changed
addMonths
Was function addMonths<DateType extends Date>(date: DateType | number | string, amount: number): DateType; now function addMonths<DateType extends Date, ResultDate extends Date = DateType>(date: DateArg<DateType>, amount: number, options?... npmjs.com
And 393 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version, not only the newest. On Team and up, a fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous management.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcp