Luxon
Home
Reference
Source
Repository
Install guide
Basic browser setup
Node
AMD (System.js, RequireJS, etc)
ES6
Webpack
Meteor
A quick tour
Your first DateTime
Creating a DateTime
Create from an object
Parse from ISO 8601
Getting to know your DateTime instance
toString
Getting at components
Other fun accessors
Formatting your DateTime
Transforming your DateTime
Immutability
Math
Set
Intl
Time zones
Durations
Intervals
Intl
How locales work
Setting locale
Checking what you got
Methods affected by the locale
Formatting
Parsing
Listing
numberingSystem
Time zones and offsets
Don't worry!
Terminology
Luxon works with time zones
Specifying a zone
IANA support
Creating DateTimes
Local by default
Creating DateTimes in a zone
Strings that specify an offset
setZone
Changing zones
setZone
keepCalendarTime
Accessors
DST weirdness
Invalid times
Ambiguous times
Math across DSTs
Changing the default zone
Calendars
Fully supported calendars
Output calendars
Formatting
Technical formats (strings for computers)
ISO 8601
HTTP and RFC 2822
toLocaleString (strings for humans)
The basics
Intl.DateTimeFormat
Presets
Intl
Formatting with tokens (strings for Cthulhu)
Consider alternatives
toFormat
Intl
Escaping
Standalone vs format tokens
Macro tokens
Table of tokens
Parsing
Parsing technical formats
ISO 8601
HTTP and RFC2822
Ad-hoc parsing
Consider alternatives
fromString
Intl
Limitations
Debugging
Table of tokens
Math
Calendar math vs time math
The basics
Which units use which math?
How to think about calendar math
DSTs
Time math
Math with multiple units
Duration math
Basics
Diffs
Casual vs longterm conversion accuracy
Losing information
Validity
Invalid DateTimes
Reasons a DateTimes can be invalid
Debugging invalid DateTimes
invalidReason
throwOnInvalid
Invalid Durations
Invalid Intervals
API reference
Class
Interface
Support matrix
What works everywhere
New capabilities and how they're used
The matrix
What happens if a feature isn't supported?
Polyfills
Intl
Zones
For Moment users
Immutability
Other API style differences
Major functional differences
DateTime method equivalence
Creation
Getters and setters
Basic information getters
Unit getters
Programmatic get and set
Transformation
Query
Output
Basics
Humanization
Durations
Intervals
Changelog
0.4
Manual
»
Changelog
Changelog
0.4
Experimental, but now broadly useful.