Skip to content

Temporal ​

tyrus:temporal provides native values for absolute instants, calendar dates, clock times, durations, zoned date-times, and checked-in IANA time zones. Every fallible native API in the module reports recoverable failures as Result<T, TemporalError>; non-fallible operations such as value equality return their direct value.

Available APIs ​

APIPurpose
InstantAbsolute points on the timeline.
PlainDateCalendar dates without a time or time zone.
PlainTimeClock times without a date or time zone.
PlainDateTimeCalendar dates combined with clock times.
ZonedDateTimeInstants associated with an IANA time zone.
DurationSigned calendar and clock units.
TimeZoneThe checked-in IANA time-zone enum and resolver.
PlainYearMonthCalendar year and month values.
PlainMonthDayRecurring month and day values.

Import ​

Importsimport { Instant, PlainDate, TimeZone, instantNow, plainDateFrom, timeZone } from "tyrus:temporal";