Luxon
What is Luxonโ
Luxon is an immutable, chainable date/time library for JavaScript. MIT licensed, currently at v3.7.x with ~26.7M weekly npm downloads. Built by Isaac Cambron, a Moment.js maintainer, Luxon lives under the moment GitHub org and is designed to address Moment's known weaknesses.
Why we recommend itโ
- Immutable API โ all operations return new instances, eliminating an entire class of mutation bugs.
- Built-in IANA time zone support โ uses the browser
IntlAPI, no plugin or data bundle needed (unlikemoment-timezone). - Built-in i18n โ leverages
Intlfor locale-aware formatting without bundling locale data. - First-class Duration & Interval types โ complex date math without plugins.
- Reasonable bundle size โ 21.4 kB min+gzip (vs Moment's 75.4 kB), ships zero locale data.
- API maps well to Temporal โ future migration path is cleaner than from other libraries.
- Spiritual successor to Moment โ built by the same people, addressing Moment's known weaknesses.
When to useโ
- Projects needing time zone handling
- Duration/Interval arithmetic
- Replacing Moment.js in existing codebases
- Any project needing a full-featured date library
When NOT to useโ
- Simple date formatting where only a few utility functions are needed โ date-fns may be lighter after tree-shaking.
- Projects exclusively targeting browsers with full Temporal support (though this is not recommended as a production default yet).
Alternativesโ
- date-fns โ modular, tree-shakable, works with native
Date. Better when only a few date utility functions are needed (~5 kB tree-shaken). No Duration type, limited time zone support. - Day.js โ Moment-compatible API in ~3 kB. Lighter but less capable (time zones and i18n require plugins).
Temporal API
The Temporal API is an upcoming native JavaScript date/time standard. As of May 2026, it is supported in Chrome 144+, Edge 144+, and Firefox 139+ (~69% global coverage) but not in Safari, Node.js, or Bun. It is not recommended as a production default yet.
Luxon's API is conceptually aligned with Temporal โ DateTime, Duration, and Interval map closely to Temporal's types โ making future migration straightforward when Temporal reaches full cross-platform support.