# date-fns-jalali

> Modern JavaScript date utility library for jalali calendar

Latest version **4.4.0-0** (published 2026-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install date-fns-jalali
pnpm add date-fns-jalali
yarn add date-fns-jalali
bun add date-fns-jalali
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.4.0-0 |
| Published | 2026-05-31 |
| First published | 2020-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | smmoosavi |

## Links

- npm: https://www.npmjs.com/package/date-fns-jalali
- Repository: https://github.com/date-fns-jalali/date-fns-jalali
- Homepage: https://github.com/date-fns-jalali/date-fns-jalali#readme
- Issues: https://github.com/date-fns-jalali/date-fns-jalali/issues
- npm.io page: https://npm.io/package/date-fns-jalali

## Recent versions

- 4.4.0-0 (latest) — 2026-05-31
- 4.3.0-0 — 2026-05-31
- 4.2.1-0 — 2026-05-31
- 4.2.0-0 — 2026-05-29
- 4.1.0-0 — 2024-09-26
- 4.0.0-0 — 2024-09-25
- 3.6.0-1 — 2024-06-24
- 3.6.0-0 — 2024-03-19
- 3.5.0-0 — 2024-03-17
- 3.4.0-0 — 2024-03-13
- 3.3.1-0 — 2024-01-24
- 3.3.0-0 — 2024-01-24
- 3.2.0-0 — 2024-01-20
- 3.1.0-0 — 2024-01-19
- 3.0.6-0 — 2024-01-16
- … 41 more at https://npm.io/package/date-fns-jalali/versions

## README

🔥️ **NEW**: [date-fns v4.0 with first-class time zone support is out!](https://blog.date-fns.org/v40-with-time-zone-support/)

[![date-fns-jalali](docs/logotype.svg)](https://date-fns.org/)

date-fns-jalali provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js for jalali calendar.

👉 [Documentation](https://date-fns.org/)

👉 [Blog](https://blog.date-fns.org/)

<hr>

It's like [Lodash](https://lodash.com) for dates

- It has [**200+ functions** for all occasions](https://date-fns.org/docs/Getting-Started/).
- **Modular**: Pick what you need. Works with webpack, Browserify, or Rollup and also supports tree-shaking.
- **Native dates**: Uses existing native type. It doesn't extend core objects for safety's sake.
- **Immutable & Pure**: Built using pure functions and always returns a new date instance.
- **TypeScript**: The library is 100% TypeScript with brand-new handcrafted types.
- **I18n**: Dozens of locales. Include only what you need.
- [and many more benefits](https://date-fns.org/)

**date-fns-jalali** provides **date-fns** toolset for [jalali calendar](https://en.wikipedia.org/wiki/Jalali_calendar)

```js
import { compareAsc, format, newDate } from "date-fns-jalali";

format(new Date(2014, 1, 11), "yyyy-MM-dd");
//=> '1392-11-22'

newDate(1392, 10, 22);
// => Tue Feb 11 2014 00:00:00

format(newDate(1392, 10, 22), "yyyy MMMM d");
// 1392 بهمن 22

const dates = [
  new Date(1995, 6, 2),
  new Date(1987, 1, 11),
  new Date(1989, 6, 10),
];
dates.sort(compareAsc);
//=> [
//   Wed Feb 11 1987 00:00:00,
//   Mon Jul 10 1989 00:00:00,
//   Sun Jul 02 1995 00:00:00
// ]
```

The library is available as an [npm package](https://www.npmjs.com/package/date-fns-jalali).
To install the package run:

```bash
npm install date-fns-jalali --save
```

## Docs

[See date-fns.org](https://date-fns.org/) for more details, API,
and other docs.

<br />

## License

MIT

---
_Source: https://npm.io/package/date-fns-jalali · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
