temporal_js library

Classes

Calendar
A calendar system used to interpret dates.
Instant
An exact point in time, represented as milliseconds since the Unix epoch (1970-01-01T00:00:00Z).
PlainDate
A calendar date (year, month, day) with no time component and no timezone.
PlainDateTime
A combined calendar date and wall-clock time with no timezone.
PlainMonthDay
A month-day combination with no year, time, or timezone.
PlainTime
A wall-clock time (hour, minute, second, sub-second) with no date and no timezone.
PlainYearMonth
A year-month pair with no specific day, time, or timezone.
TemporalDuration
A duration spanning both calendar units (years, months, weeks, days) and time units (hours, minutes, seconds, milliseconds, microseconds, nanoseconds).
TimeZone
An IANA timezone identifier (e.g. 'America/New_York', 'UTC').
ZonedDateTime
A date and time anchored to an IANA timezone.

Exceptions / Errors

TemporalException
Thrown when a Temporal operation fails due to invalid input or out-of-range values. kind contains the error category name from the TC39 spec (e.g. 'range', 'type', 'syntax', 'generic').