# Luxon

> A library for working with dates and times in JS

Source: https://talira.ai/catalog/luxon-m1f352y5
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / dates and times](https://talira.ai/categories/libraries/dates-and-times), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^5]
- Pricing: Free and open source[^5]
- Free tier: yes[^5]
- Self-hostable: yes[^6]
- API: yes[^7]
- Creator: Isaac Cambron, one of Moment's maintainers

Luxon is a JavaScript library for dates and times built around immutable `DateTime`, `Duration` and `Interval` types with an explicit, chainable API. It takes time zones and internationalization from the platform's Intl API, so IANA zones and locale-aware formatting and parsing need no locale or time zone data files. Isaac Cambron, one of Moment's maintainers, wrote it as a modernized Moment, and it lives in the Moment project's [GitHub](https://talira.ai/catalog/github-ppcgj756.md) organization. Calendars other than Gregorian and ISO week dates are supported for output only. A new maintainer took over in January 2025 and is planning Luxon 4, which replaces invalid objects with errors.

## Links

- Website: https://moment.github.io/luxon/
- GitHub: https://github.com/moment/luxon
- Docs: https://moment.github.io/luxon/api-docs/index.html

## Problems it solves

- convert a meeting time between New York and Tokyo in JavaScript without shipping time zone data
- add a duration to a date and keep the wall-clock time right across daylight saving changes
- represent a date range and check whether another time falls inside it
- format dates in each user's locale using the browser's built-in Intl support
- work out the time between two timestamps as months, days and hours in JS
- parse ISO 8601, RFC 2822, HTTP and SQL date strings in Node
- show a date in the Islamic or Japanese calendar on a web page
- a date API where each method does one explicit thing instead of guessing what I passed
- find out why a date string in a custom format failed to parse
- immutable date objects in JavaScript so a shared date can't change under me

## Features

- DateTime, Duration and Interval types
- immutable, chainable, explicit API
- IANA time zones through the Intl API, with no time zone data files
- locale-aware formatting and parsing through Intl, with no locale files
- parsing ISO 8601, RFC 2822, HTTP and SQL strings and custom formats
- fromFormatExplain to debug a parse
- relative time with toRelative and toRelativeCalendar
- output calendars: Buddhist, Chinese, Hebrew, Islamic, Japanese, Persian and others, where the platform has them
- ISO week dates
- throwOnInvalid setting to throw instead of returning invalid objects
- Info.features() to check what the platform supports

## Limitations

- Can't do date math in non-Gregorian calendars: Islamic, Hebrew, Japanese and other calendars are supported only for formatting[^1]
- Doesn't parse time zone names or abbreviations like EST or Eastern Standard Time: named offsets are supported only in formatting[^2][^3]
- No support for Internet Explorer: it officially supports the last two versions of major browsers, and older IE probably won't work at all[^4]

## Capabilities

- Has an API: plan not known

## Trust

Overall: 0.28 out of 1.
Signals: backing 0.20, extensibility 0.20.

- created by Isaac Cambron, one of Moment's maintainers

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [date-fns](https://talira.ai/catalog/date-fns-w93szbbe.md): Modern JavaScript date utility library
- [Day.js](https://talira.ai/catalog/day-js-evrthewv.md): Fast 2kB alternative to Moment.js with the same modern API
- [Moment.js](https://talira.ai/catalog/moment-js-sv97zp5y.md): Parse, validate, manipulate, and display dates in javascript.

## Sources

[^1]: https://github.com/moment/luxon/blob/master/docs/calendars.md (checked 20 Nov 2026)
[^2]: https://github.com/moment/luxon/blob/master/docs/parsing.md (checked 20 Nov 2026)
[^3]: https://github.com/moment/luxon/blob/master/docs/zones.md (checked 20 Nov 2026)
[^4]: https://github.com/moment/luxon/blob/master/docs/matrix.md (checked 20 Nov 2026)
[^5]: https://github.com/moment/luxon/blob/master/LICENSE.md (checked 20 Nov 2026)
[^6]: https://github.com/moment/luxon (checked 20 Nov 2026)
[^7]: https://moment.github.io/luxon/api-docs/index.html (checked 20 Nov 2026)
