GitHub

Best JavaScript date libraries

Libraries for parsing, formatting and calculating with dates. date-fns leads with about 118M real installs a week, followed by dayjs with about 109M.

packagereal installs / weeknpm / weeknoiselast releaseconfidence
1. date-fnsModern JavaScript date utility library 118M 118,219,626 under 1% May 2026 high
2. dayjs2KB immutable date time library alternative to Moment.js with the same modern API 109M 109,228,671 under 1% Aug 2026 high
3. luxonImmutable date wrapper 58.3M 58,320,740 under 1% Sep 2025 high
4. momentParse, validate, manipulate, and display dates 51M 51,004,578 under 1% Sep 2026 high
5. @js-temporal/polyfillPolyfill for Temporal (https://github.com/tc39/proposal-temporal), an ECMA TC39 Stage 3 proposal 6.89M 6,890,255 under 1% Mar 2025 high

Ranked by real installs. That measures use, not quality: read the notes below before choosing. Mirror spikes and crawlers removed. CI and dependency installs still count, so this is not a head count. Noise: the share of npm's count that mirror spikes and crawlers account for. What remains still includes CI and dependency installs. Rows are refreshed in rotation, the oldest here on Nov 6, 2026.

How do they differ?

date-fns is a set of separate functions that tree-shake well. Day.js is small, with an API close to Moment. Luxon builds on the Intl API and handles time zones well. Moment is in maintenance mode, and its own docs suggest an alternative for new projects.

Check a package