Install guide

Luxon provides different builds for different JS environments. See below for a link to the right one and instructions on how to use it. Luxon supports all modern platforms, but see the support matrix for additional details.

See the support matrix for more information on what works and what doesn't in IE.

Node

Supports Node 6+. Install via NPM:

npm install --save luxon

const { DateTime } = require("luxon");

If you want to work with locales, you'll need to have full-icu support installed in Node. You can build Node with it, use an NPM module to provide it, or find it prepackaged for your platform, like brew install node --with-full-icu. If you skip this step, Luxon still works but methods like setLocale() will do nothing.

The instructions for using full-icu as a package are a little confusing. Node can't automatically discover that you've installed the it, so you need to tell it where to find the data, like this: