Type Alias: InvalidInstantReason
InvalidInstantReason =
"unreadable"|"no-such-date"|"not-finite"|"null-value"|"zoneless"
Defined in: model/errors.ts:175
Why toInstant/instant refused a value — the closed set InvalidInstantError.reason takes, so
a consumer branches on data instead of parsing the message (#242).
'unreadable'— not a date this library reads at all: an unparseable string, a boolean, a plain object, an array. The catch-all for everything the other four reasons do not name.'no-such-date'— a calendar date the calendar does not have, such as'2026-02-31'.'not-finite'— anumberthat is not a finite count of epoch milliseconds (NaN,Infinity).'null-value'—nullorundefined. Not a zone problem: an absent date is a value left out, not a null one (#431).'zoneless'— a real wall-clock reading with no zone attached, handed toinstant(), which resolves no zone. Onlyinstant()produces it —toInstanthas a zone and resolves such a string instead of refusing it.