Elestia Open Source Ratings
8.0

date-fns

A strong pick. 1st of 10 date and time libraries.

date-fns is a library of more than 200 small, tree-shakable, typed functions that work on the native Date. Since v4, time zones come through the separate @date-fns/tz package. It is the safest general pick among the classic date libraries today. Its downloads grow a little slower than the median of rated projects, and native Temporal is the long-term direction for new code.

Best for: TypeScript teams that want small, tree-shakable, functional date helpers on the native Date and on any runtime, until Temporal works everywhere they need it.

WebsiteGitHubnpm

Scores

Overall8.0

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

It is the strongest of the established date libraries: functional, typed and tree-shakable, with real time zone support since v4 and a clean security record. Native Temporal now does the same job better where it is available. A thin maintainer bench and slightly-below-median growth keep it out of the 9 tier. Pick it today when you need wide browser support, and plan to move to Temporal in time.

GPT-6.2 Sol: 8.5, likely 7.4 to 9.4

date-fns is a strong pick for new projects that use native Date values and need more than basic formatting. Day.js has a smaller measured footprint for MUI-only pickers, and Temporal offers distinct types for date-only values and zoned times. Slower relative adoption growth, the release gap, and uncertain release safeguards keep the recommendation below the category-default tier.

Needed by many7.7

How many developers need a tool for this job?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

Most web apps and many back ends need to format, parse or do maths on dates. date-fns works on any runtime and with any framework. The native Intl API and Temporal take over part of this need, which keeps the score below the top.

GPT-6.2 Sol: 7.3, likely 6.2 to 8.4

Parsing dates, calculating deadlines, and formatting across locales are common needs in web apps and services. The native Date API works across frameworks, and the companion packages extend it to explicit time zones. The share of projects that need a library is harder to estimate because built-in APIs already cover basic formatting and timestamps.

Helps a lot8.3

How well does it do the job for those who need it?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

It offers a wide set of pure functions, good types, small tree-shaken bundles and broad locale coverage. v4 added real IANA time zone support through TZDate. That support lives in a separate package, and the library still sits on the flawed Date model, so Temporal handles DST-correct arithmetic and calendars better. Format tokens such as dd and DD differ from Moment's and cause common bugs.

GPT-6.2 Sol: 8.5, likely 7.4 to 9.4

Stable 4.4.0 has extensive calendar helpers, bundled types, and examples that give coding agents a clear pattern for routine calls. The parser documents invalid input and explains common token mistakes, though a reported locale bug can silently turn noon into midnight. Named-zone arithmetic needs a companion package and can depend on argument order unless an explicit zone is supplied. MUI measured a modest bundle cost, but broader runtime performance and agent accuracy remain uncertain.

Holds up over time7.1

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

The project is active, with 321 commits and 5 releases in the last year and v4.4.0 out in May 2026. Breaking changes in v4 were small. A large pull request backlog and reliance on one lead maintainer, funded by donations, are risks. Temporal is now Stage 4 and on by default in Chrome 144+ and Node 26, so the ecosystem will slowly move away from Date-based helpers.

GPT-6.2 Sol: 7.2, likely 5.9 to 8.4

The repository recorded 321 commits in a year, well ahead of Day.js and Luxon, and a v5 alpha outlines further package-size work. Stable releases have paused since May, hundreds of issues and pull requests are open, and one user reported a TypeScript import failure after a minor upgrade. The same maintainer posts recent GitHub releases and receives sponsorship, but funding depth and backup release capacity are unclear. Native Temporal is a plausible long-term substitute as browser support expands.

Used widely8.5

How many use it, and is that growing?

Claude Opus 5.5: 9.0, likely 8.0 to 9.5

It has the highest downloads in the category (482M in 4 weeks) and the second-most dependent repos (750k, after Moment). Downloads grew 3.3x, which is below the 4.1 median and a little behind Day.js (3.6x), so its share is roughly flat to slightly falling. Some downloads come through tools such as react-datepicker and concurrently rather than direct choice.

  • npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 481.6M vs 144.0M, a ratio of 3.34
  • medianDownloadsRatio: the median is 4.1, so growth is below the median
  • dependents.repos: 750k repos, against 490k for Day.js and 78k for Luxon
  • github stars: 36.7k stars

GPT-6.2 Sol: 7.9, likely 6.8 to 8.9

ecosyste.ms found about 750,000 dependent repositories and 13,600 dependent packages, with more repositories than Day.js or Luxon and fewer than Moment.js. Four-week downloads lead the peer set, but growth of 3.34× trails both Day.js at 3.59× and the catalog median of 4.1×, indicating a loss of relative ground. State of JavaScript respondents reported more regular use of date-fns than of the other date libraries listed. Automated and downstream installs blur the number of direct choices, and the small social sample adds little.

  • dependents repos, packages: 750,093 repositories and 13,555 packages in the ecosyste.ms index.
  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo: 481.6 million versus 144.0 million installs implies 3.34× growth.
  • medianDownloadsRatio: Catalog-wide comparison baseline is 4.1×.
  • peers: Day.js has 490,144 dependent repositories and Moment.js has 1,006,179.
  • github stars, hackerNews, bluesky: 36,657 stars, three low-engagement HN stories, and three Bluesky entries including one outside the stated window.
  • 2025.stateofjs.com/en-US/other-tools: 4,182 regular users, ahead of Moment, Day.js, and Luxon in this sample.
  • daypicker.dev/localization/setting-time-zone: React DayPicker is one route for indirect adoption.
Vouched for7.7

Who stands behind it being good?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Popular UI tools such as react-datepicker and MUI's date pickers build on it, and independent 2026 comparisons often name it the default. Most of those comparisons are vendor-style guides. I found no current survey results that rate its satisfaction, so the range stays moderate.

GPT-6.2 Sol: 8.4, likely 7.3 to 9.3

React DayPicker uses date-fns internally for time zones, and MUI X maintains a current v4 adapter. MUI's measured bundle cost falls between Day.js and Luxon in its picker workload. In State of Frontend 2024, 53.9% of respondents said they had used and liked date-fns and 4.3% said they had used and disliked it, though those results predate the current release.

Safe7.5

How safe is it to depend on?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

It has zero runtime dependencies, no known advisories ever and an MIT licence on npm. The OpenSSF Scorecard is weak at 4.6, with zero scores on code review, token permissions, pinned dependencies and SAST. The licence check also fails on the GitHub side. The attack surface stays small because the package has no install scripts and no dependencies.

  • advisories.total: 0 advisories
  • npm dependencies: 0 runtime dependencies
  • scorecard: 4.6 overall; Code-Review, Token-Permissions and Pinned-Dependencies at 0
  • npm license: MIT

GPT-6.2 Sol: 7.4, likely 6.2 to 8.6

The MIT-licensed core adds no runtime dependencies, and the OSV snapshot lists zero advisories. The project publishes a security policy, and GitHub verifies the v4.4.0 release commit signature. The 4.6 OpenSSF Scorecard flags weak code-review, workflow-token, and dependency-pinning controls. npm publishing provenance and the number of authorized publishers remain unverified.

Good

  • Pure, immutable functions that tree-shake well, so a bundle pays only for the functions it imports.
  • No runtime dependencies, built-in TypeScript types and more than 100 locales.
  • Since v4, the functions accept TZDate and an `in: tz(...)` context for IANA time zones.
  • AI agents write correct code for it because its API is large, stable and widely documented.

Bad

  • Time zone support sits in a second package, and the older date-fns-tz add-on is no longer updated, which confuses users.
  • The installed package is large on disk (about 21-22 MB), even though bundles stay small.
  • 455 open pull requests and 677 open issues show a review backlog that one core maintainer mainly carries.
  • Native Temporal now covers its functional style, which weakens the case for adopting it in new code over time.

The numbers

npm downloads, 4 weeks
482M ×3.3 in a year
GitHub stars
37k
Commits, 12 months
321
npm version
4.4.0 May 2026
Versions, 12 months
4
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
4.6 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (date-fns/date-fns), npm (date-fns), OSV and the OpenSSF Scorecard.

Date and time libraries

  1. 8.0date-fns
  2. 7.5temporal-polyfill
  3. 6.8Day.js
  4. 6.6Luxon
  5. 5.5Tempo
  6. 5.2Spacetime
  7. 5.0@js-temporal/polyfill
  8. 4.2date-fns-tz
  9. 3.8Moment Timezone
  10. 3.6Moment.js
Compare all 10 on six scores