Skip to main content
Temporal.ToInstantOptions.disambiguation - Temporal - Web documentation
property Temporal.ToInstantOptions.disambiguation
Controls handling of invalid or ambiguous times caused by time zone offset changes like Daylight Saving time (DST) transitions. This option is only relevant if a `DateTime` value does not exist in the destination time zone (e.g. near "Spring Forward" DST transitions), or exists more than once (e.g. near "Fall Back" DST transitions). In case of ambiguous or nonexistent times, this option controls what exact time to return: - `'compatible'`: Equivalent to `'earlier'` for backward transitions like the start of DST in the Spring, and `'later'` for forward transitions like the end of DST in the Fall. This matches the behavior of legacy `Date`, of libraries like moment.js, Luxon, or date-fns, and of cross-platform standards like [RFC 5545 (iCalendar)](https://tools.ietf.org/html/rfc5545). - `'earlier'`: The earlier time of two possible times - `'later'`: The later of two possible times - `'reject'`: Throw a RangeError instead The default is `'compatible'`.

Type

"compatible"
| "earlier"
| "later"
| "reject"