luxon

GitHub

⏱ A library for working with dates and times in JS

AI Prompts & Endpoints
CodeWiki Knowledge Base

Repository: moment/luxon


Stars: 16388

README.md

Luxon

[![MIT License][license-image]][license] [![Build Status][github-action-image]][github-action-url] [![NPM version][npm-version-image]][npm-url] [![Coverage Status][test-coverage-image]][test-coverage-url] [![PRs welcome][contributing-image]][contributing-url]

Luxon is a library for working with dates and times in JavaScript.

js
DateTime.now().setZone("America/New_York").minus({ weeks: 1 }).endOf("day").toISO();

🚀 The road to Luxon 4.0

Please read about and share your feedback on the plans for the next major version of Luxon!

Upgrading to 3.0

Guide

Features


* DateTime, Duration, and Interval types.
* Immutable, chainable, unambiguous API.
* Parsing and formatting for common and custom formats.
* Native time zone and Intl support (no locale or tz files).

Download/install

Download/install instructions

Documentation

* General documentation
* API docs
* Quick tour
* For Moment users
* Why does Luxon exist?
* A quick demo

Development

See contributing.

![Phasers to stun][phasers-image]

[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
[license]: LICENSE.md

[github-action-image]: https://github.com/moment/luxon/actions/workflows/test.yml/badge.svg
[github-action-url]: https://github.com/moment/luxon/actions/workflows/test.yml

[npm-url]: https://npmjs.org/package/luxon
[npm-version-image]: https://badge.fury.io/js/luxon.svg

[test-coverage-url]: https://codecov.io/gh/moment/luxon
[test-coverage-image]: https://codecov.io/gh/moment/luxon/branch/master/graph/badge.svg

[contributing-url]: https://github.com/moment/luxon/blob/master/CONTRIBUTING.md
[contributing-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg

[phasers-image]: https://img.shields.io/badge/phasers-stun-brightgreen.svg