# Moment.js: 3.6 out of 10

Keep, but not for new work. 10th of 10 in [Date and time libraries](https://elestia.ai/opensource/dates/index.md).

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.

## Scores

- **Overall: 3.6** (likely 2.6 to 4.7)
  - Claude Opus 5.5 (3.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): 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 many: 6.8** (likely 5.7 to 7.9)
  - Claude Opus 5.5 (7.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): 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 lot: 5.4** (likely 4.3 to 6.4)
  - Claude Opus 5.5 (4.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): 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 time: 4.5** (likely 3.5 to 5.7)
  - Claude Opus 5.5 (4.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): 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 widely: 6.6** (likely 5.5 to 7.8)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (7.2): 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.
- **Vouched for: 4.9** (likely 3.8 to 6.4)
  - Claude Opus 5.5 (3.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): 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.
- **Safe: 6.7** (likely 5.6 to 7.7)
  - Claude Opus 5.5 (6.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): 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

- Downloads, 4 weeks: 205M
- In a year: +94%
- GitHub stars: 48k
- Commits, 12 months: 68
- Last npm release: Sept 2026
- Advisories, 24 months: 1
- Licence: MIT
- GitHub: https://github.com/moment/moment
- npm: https://www.npmjs.com/package/moment

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
