Static
defaultGet the default locale to create DateTimes with. Does not affect existing instances.
Set the default locale to create DateTimes with. Does not affect existing instances.
Static
defaultGet the default numbering system to create DateTimes with. Does not affect existing instances.
Set the default numbering system to create DateTimes with. Does not affect existing instances.
Static
defaultGet the default output calendar to create DateTimes with. Does not affect existing instances.
Set the default output calendar to create DateTimes with. Does not affect existing instances.
Static
defaultGet the default time zone object to create DateTimes in. Does not affect existing instances.
[TS] had to use type Zone here. I created another setter to use a ZoneLike instead Let's face it. This is ugly. The original should have this approach as well. Set the default time zone to create DateTimes in. Does not affect existing instances. Use the value "system" to reset this value to the system's time zone.
Static
default[TS] can't use the real setter here because set and get must have the same type. Let's face this. This is bullshit. But I get that you want to make life easier for users. Set the default time zone to create DateTimes in. Does not affect existing instances. Use the value "system" to reset this value to the system's time zone.
Static
nowGet the callback for returning the current timestamp.
Set the callback for returning the current timestamp. The function should return a number, which will be interpreted as an Epoch millisecond count
Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
Static
throwGet whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
Static
resetGenerated using TypeDoc
Settings contains static getters and setters that control TsLuxon's overall behavior. TSLuxon is a simple library with few options, but the ones it does have live here.