Link Search Menu Expand Document

Luxon

Quickstart

import { DateTime } from 'luxon';
DateTime.local();
DateTime.local().setZone('America/New_York').minus({ weeks: 1 }).endOf('day').toISO();

Formatting

dt.toLocaleString(DateTime.DATETIME_FULL)

Concepts

Datetime

The most important class in Luxon is DateTime. A DateTime represents a specific millisecond in time, along with a time zone and a locale. Here's one that represents May 15, 2017 at 8:30 in the morning:

var dt = DateTime.local(2017, 5, 15, 8, 30);

Cook

epoch time


Table of contents