npmbot.com
AI

moment

v2.30.1MITTS Ready

Parse, validate, manipulate, and display dates and times in JavaScript.

65/ 100
Maintenance Warning
Weekly Downloads
24.0M
Bundle Size (gzip)
72.1 kB(288.4 kB min)
Dependencies
Zero Deps
Last Updated
2024-01-20
SPONSORED CLOUD & DEV TOOLSβ€’Google Ads Partner
NPMBot AI Assessment

Officially in maintenance mode. Avoid for all new projects due to massive size and mutability.

The Moment.js maintainers themselves officially declared the project finished in 2020. Its mutable API causes frequent calculation bugs, and its inability to tree-shake locales drags ~72kB of gzipped code into your bundle. Migrating to Day.js or date-fns is universally recommended.

Key Advantages
  • β€’Decade of community answers on StackOverflow
  • β€’Full locale coverage included in bundle
Gotchas & Limitations
  • β€’Deprecated for new projects by the original core authors
  • β€’Bloated bundle size: over 72kB gzipped (vs Day.js 2kB)
  • β€’Mutable objects: date manipulation mutates the original instance in-place
  • β€’Zero tree-shaking support
Recommended For:

Old legacy codebases where migration cost outweighs performance gains

Avoid If:

ANY new project, frontend apps, or bundle-sensitive systems

FEATURED PARTNERβ€’Google Ads Partner
Installation & Quickstart
Package Manager Command
javascript
npm install moment
moment Usage Example
javascript
import moment from 'moment';

const now = moment().format('MMMM Do YYYY, h:mm:ss a');
console.log(now);
Compare moment with Alternatives