Introduction to Luxon
masterLuxon is a JavaScript library designed for working with dates and times. It provides an immutable, chainable, and unambiguous API for managing temporal data. Key features include:
- Core Types:
DateTime,Duration, andInterval. - Immutability: All operations return a new instance rather than mutating the existing one.
- Native Support: Uses native time zone and
Intlsupport, meaning it does not require external locale or time zone data files. - Parsing & Formatting: Supports both common and custom formats.
DateTime.now().setZone("America/New_York").minus({ weeks: 1 }).endOf("day").toISO();