Skip to content
JS
Comparison

date-fns vs moment

date-fns is a collection of standalone functions for working with native JavaScript Date objects, and moment is a date library for parsing, validating, manipulating and formatting dates.

Date and timePackage data 25 Sept 2026
date-fnsv4.4.0, 29 May 2026

Collection of standalone functions for working with native JavaScript Date objects.

$ npm install date-fns
momentv2.31.0, 15 Sept 2026

Date library for parsing, validating, manipulating and formatting dates.

$ npm install moment
Metricdate-fnsmomentDifference
Weekly downloads72,360,90426,501,970date-fns 2.7x higher
12-month download growth+129%+22%date-fns +106 pts
Gzip size---
Minified size---
Dependencies00Same
Unpacked size10.4 MB4.3 MBmoment 2.4x smaller
Latest release4.4.0, 29 May 20262.31.0, 15 Sept 2026moment 4 months more recent
Releases, last 12 months41date-fns 3 more
First published6 Oct 201417 Oct 2011moment 3.0 years earlier
GitHub stars36,64647,909moment +31%
Open issues66541date-fns 624 more
Open pull requests35316date-fns 337 more
Contributors431--
Commits, last 52 weeks31666date-fns 4.8x higher
TypeScript typesBundledBundledSame
Module formatESM + CommonJSCommonJSDiffers
RuntimesBrowser, Node.jsBrowser, Node.jsSame
LicenseMITMITSame

Green marks the smaller size or the more recent release. Bold marks the higher count, with no judgement implied. Sizes are for the whole package per Bundlephobia. Growth compares the average of the last 4 weeks with the first 4 weeks of the 52-week series.

date-fns72.4m latest weekmoment26.5m latest week
Week of 23 Sept 2025Week of 15 Sept 2026
Weekly npm downloads, 52 weeks. Y axis starts at zero. Values are not smoothed.

date-fns

Major versions
  1. 0.1.06 Oct 2014
  2. 1.0.018 May 2016
  3. 2.0.020 Aug 2019
  4. 3.0.018 Dec 2023
  5. 4.0.016 Sept 2024
Last 5 releases
  1. 4.4.029 May 2026
  2. 4.3.022 May 2026
  3. 4.2.118 May 2026
  4. 4.2.018 May 2026
  5. 4.1.017 Sept 2024
137 releases in total, 4 in the last 12 months

moment

Major versions
  1. 1.1.027 Oct 2011
  2. 2.0.08 Feb 2013
Last 5 releases
  1. 2.31.015 Sept 2026
  2. 2.30.127 Dec 2023
  3. 2.30.026 Dec 2023
  4. 2.29.46 Jul 2022
  5. 2.29.317 Apr 2022
77 releases in total, 1 in the last 12 months
date-fns

Standalone functions, tree-shakeable

moment

Chainable, mutable wrapper object

date-fns
  • Functions operate on the native Date type and do not extend core objects.
  • Pure functions that always return a new date instance.
  • v4 added time zone support through the separate @date-fns/tz package, which provides TZDate.
  • Written in TypeScript. Locales are imported individually.
moment
  • The README says: "Moment.js is a legacy project, now in maintenance mode. New features are not being accepted."
  • The project status page says the mutable API will not be redesigned.
  • The same page says a 3.0 release is no longer ruled out, but only as a maintenance release with no schedule announced.
  • Published as CommonJS.
  • Need no runtime dependenciesBoth
  • Need both ESM and CommonJS entry pointsdate-fns (date-fns: ESM + CommonJS; moment: CommonJS)
  • Need to load it with require()Both
  • Need TypeScript types in the package itselfBoth
  • Node.js version requirementdate-fns: none declared; moment: * (engines field in package.json)
  • Need the more recent releasemoment (2.31.0 on 15 Sept 2026 vs 4.4.0 on 29 May 2026)
  • Higher weekly npm downloadsdate-fns (72.4m vs 26.5m)

Each line is generated from the data above.

Indexability: Indexed: 30 US searches/month across both orderings ("date-fns vs moment", "moment vs date-fns").