Elestia Open Source Ratings
3.6

Moment.js

Keep, but not for new work. 10th of 10 date and time libraries.

Moment.js is the original JavaScript date library, and its own maintainers call it a legacy project in maintenance mode. It still works and gets security fixes. Keep it where it already runs, but start new projects with date-fns, Day.js, Luxon or a Temporal polyfill.

Best for: Teams that keep an existing Moment codebase running until they can migrate.

WebsiteGitHubnpm

Scores

Overall3.6

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

Claude Opus 5.5: 3.0, likely 2.0 to 4.0

Moment is the textbook keep-where-it-runs library. It is stable, maintained for security and has zero dependencies. But its own maintainers steer new projects elsewhere, and date-fns, Day.js and Luxon do the same job with immutable APIs and smaller bundles. Its share of new projects is falling against every major peer.

GPT-6.2 Sol: 4.2, likely 3.2 to 5.3

Moment remains useful where existing code depends on its parsing, locales, or plugins, and 2.31.0 shows those users still get fixes. For new projects, date-fns offers modular functions, Day.js offers a smaller immutable API with familiar syntax, and Luxon handles named time zones through Intl. The compatibility work promised by the roadmap could improve the case for Moment, but its current packaging, mutable API, and falling relative download share make it a weak default.

Needed by many6.8

How many developers need a tool for this job?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Most web apps and many backends parse, format and compare dates, so the category is broad. Moment is general-purpose and runs on any runtime. Native Intl and Temporal now cover part of this need without a library, which keeps the score off the top.

GPT-6.2 Sol: 6.6, likely 5.4 to 7.7

Custom date parsing, calendar arithmetic, and localized display matter across browser and server projects. Moment works across frameworks, and its locale support serves a wide range of applications. Basic formatting is already covered by Intl, and the available surveys measure library use more directly than the need for Moment’s particular API.

Helps a lot5.4

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

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

Moment does the job reliably, with mature parsing, formatting and locales, and AI agents write it fluently. But its mutable API, large bundle that cannot be tree-shaken, and lack of new features make it clearly worse than date-fns, Day.js or Luxon. Time zones need the separate Moment Timezone package.

GPT-6.2 Sol: 6.7, likely 5.6 to 7.8

Version 2.31.0 has extensive examples, bundled types, strict parsing with diagnostic flags, and a rich API for durations and locales. Mutable objects, limited tree shaking, and the separate package for named time zones make it harder to use safely and efficiently. A 2026 MUI benchmark using 2.30.1 found a larger bundle than Day.js or date-fns, and a user reported changed default-zone behavior after upgrading to 2.31.0. Examples give coding agents a starting point, while their reliability on parsing and mutation edge cases remains uncertain.

Holds up over time4.5

Will it still be a good choice in two years?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

The project is in maintenance mode by design: no new features and no change to the mutable API. It is not dead. It sits under the OpenJS Foundation, had 68 commits and a 2.31.0 release in 2026, and widened its scope in August 2026 to include packaging and types. Still, the ecosystem is moving away from it towards Temporal and its peers.

GPT-6.2 Sol: 5.0, likely 3.9 to 6.3

Moment logged 68 commits in the past year, and September’s 2.31.0 brought parsing, locale, and security fixes in its first new npm release since 2023. Volunteer maintainers prioritize compatibility and may improve packaging or types, with no schedule for a possible maintenance-focused 3.0. Some locale reports have stayed open for years, and the latest release identifies one release lead, leaving future release capacity uncertain. Native Temporal is already shipping in major runtimes, giving new projects another option.

Used widely6.6

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Moment still has about 205M downloads per 4 weeks and over a million dependent repositories, the most in the category. But its year-on-year ratio is 1.94, far below the median of 4.1 and below date-fns (3.3) and Day.js (3.6). Most installs come from old codebases and transitive dependencies, so few new projects choose it.

  • npm downloadsLast4Weeks: 205M now vs 106M a year ago, ratio 1.94 vs median 4.1
  • dependents repos: 1,006,179 dependent repositories, the highest among peers
  • peers downloadsLast4Weeks: date-fns 482M and Day.js 441M are well ahead and growing faster
  • pkgpulse.com/guides/why-developers-abandoning-momentjs-2026: Remaining downloads mostly come from legacy dependency chains

GPT-6.2 Sol: 7.2, likely 6.0 to 8.5

Ecosyste.ms found about one million dependent repositories and 54,000 packages, with more indexed repositories than any listed peer. Four-week downloads rose from 106 million to 205 million, a 1.94× increase that trails the catalog median of 4.1× and the growth of date-fns, Day.js, and Luxon. Automated installs, older codebases, and packages such as Moment Timezone make it hard to estimate how many projects are choosing Moment today.

  • dependents.repos and dependents.packages: 1,006,179 repositories and 54,055 npm packages in the index.
  • npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, and medianDownloadsRatio: 1.94× year-over-year growth against the 4.1× catalog median.
  • peers, github.stars, and bluesky.posts: Moment leads in indexed repos, has about 48,000 stars, and saw two recent Bluesky posts.
  • github.com/moment/moment-timezone/blob/develop/package.json: Moment Timezone pulls in Moment as a runtime dependency.
  • 2025.stateofjs.com/en-US/other-tools: Regular use trailed date-fns and was close to Day.js among respondents.
Vouched for4.9

Who stands behind it being good?

Claude Opus 5.5: 3.0, likely 2.0 to 5.0

Moment has a long production history, but current validation points the other way. The maintainers, independent guides and migration articles all recommend other libraries for new work. Little current praise or survey support exists for picking it today.

GPT-6.2 Sol: 6.7, likely 5.5 to 7.7

NASA’s Metadata Management Tool and Nextcloud Server still list Moment as a runtime dependency, and MUI X maintains an adapter. The 2024 State of Frontend survey recorded 45.1% used and liked and 24.9% used and disliked for Moment, a much more divided result than date-fns or Day.js. MUI recommends Day.js for new installations, and a developer who migrated a date-heavy app reported that Moment’s chaining was useful and that bundle size drove the switch.

Safe6.7

How safe is it to depend on?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

It has no dependencies, an MIT licence, a security policy and a threat model. It has five advisories in total. The newest, CVE-2026-17495, was an incomplete fix of the 2022 path traversal bug and stayed open across versions 2.29.2 to 2.30.1 until it was fixed in 2.31.0. The Scorecard is 6.1, with weak code review, branch protection and pinned dependencies.

GPT-6.2 Sol: 7.4, likely 6.2 to 8.4

The MIT-licensed core has zero runtime dependencies, and 2.31.0 patched the latest locale vulnerability by the time it was publicly disclosed. Earlier advisories include parsing denial of service and a prior locale vulnerability that needed a follow-up fix. The release workflow tests the exact npm artifact and publishes it with provenance using an npm token. OpenSSF’s 6.1 score and weak review, branch protection, and dependency pinning leave room for stronger controls.

Good

  • It has no dependencies and an MIT licence, and its API is very well known to developers and AI agents.
  • Parsing, formatting, relative time and locale coverage are mature after 15 years of use.
  • It is still maintained under the OpenJS Foundation, and security fixes shipped in 2.31.0 in September 2026.
  • Moment Timezone offers a proven way to handle IANA time zones in existing code.

Bad

  • Its objects are mutable, so methods like add() change the original date and cause bugs in UI state.
  • It is about 70 KB gzipped and cannot be tree-shaken, which is far heavier than Day.js or date-fns.
  • The maintainers themselves advise against using it in new projects and point to alternatives.
  • Downloads grow much more slowly than the npm median and its peers, so its share is falling.

The numbers

npm downloads, 4 weeks
205M +94% in a year
GitHub stars
48k
Commits, 12 months
68
npm version
2.31.0 Sept 2026
Versions, 12 months
1
Advisories, 24 months
1 of 5 ever
OpenSSF Scorecard
6.1 out of 10, Oct 2026
Licence
MIT

Read on 21 November 2026 from GitHub (moment/moment), npm (moment), 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