---
title: "date-fns Breaking Changes on npm | Since.dev"
description: "What each date-fns release removed, renamed or changed: 403 breaking changes in 1 version on npm, each with its source."
canonical_url: https://since.dev/packages/npm/date-fns
last_updated: 2024-09-16
---

# 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

## 4.0.0

403 breaking changes, first published September 16, 2024.

- **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](https://github.com/date-fns/date-fns/releases/tag/v4.0.0)
- **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](https://github.com/date-fns/date-fns/releases/tag/v4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)
- **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](https://www.npmjs.com/package/date-fns/v/4.0.0)

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](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
