Best Alternatives to dayjs

2kB immutable date library with Moment.js-compatible API

Why look for an alternative?

Day.js covers most use cases at 2kB but requires plugins for advanced features like timezone support. If you need richer functionality or better TypeScript types, alternatives are worth considering.

Current

dayjs

v1.11.19 · MIT

2KB immutable date time library alternative to Moment.js with the same modern API

Weekly Downloads

39.3M

Bundle (gzip)

3.0 kB

date-fns

v4.1.0 · MIT

Better TypeScript types and more comprehensive function set

Weekly Downloads

49.6M

Bundle (gzip)

17.1 kB

UniversalTypeScriptTree-shakeableESM

moment

v2.30.1 · MIT

Legacy option — only if maintaining existing Moment codebase

Weekly Downloads

30.6M

Bundle (gzip)

75.4 kB

UniversalBrowserDeprecated

luxon

v3.7.2 · MIT

Built-in timezone and internationalization without plugins

Weekly Downloads

23.3M

Bundle (gzip)

21.4 kB

UniversalTypeScriptBrowser

More Date Library Packages

See the Full Download History

Compare dayjs and its alternatives side by side with download trends over time.

Open in npm Trends