Skip to main content
Temporal - Temporal - Web documentation
namespace Temporal
Unstable

Classes

c
Temporal.Calendar

A Temporal.Calendar is a representation of a calendar system. It includesinformation about how many days are in each year, how many months are ineach year, how many days are in each month, and how to do arithmetic inthat calendar system.

c
Temporal.Duration

A Temporal.Duration represents an immutable duration of time which can beused in date/time arithmetic.

c
Temporal.Instant

A Temporal.Instant is an exact point in time, with a precision innanoseconds. No time zone or calendar information is present. Therefore,Temporal.Instant has no concept of days, months, or even hours.

c
Temporal.PlainDate

A Temporal.PlainDate represents a calendar date. "Calendar date" refers to theconcept of a date as expressed in everyday usage, independent of any timezone. For example, it could be used to represent an event on a calendarwhich happens during the whole day no matter which time zone it's happeningin.

c
Temporal.PlainDateTime

A Temporal.PlainDateTime represents a calendar date and wall-clock time, witha precision in nanoseconds, and without any time zone. Of the Temporalclasses carrying human-readable time information, it is the most generaland complete one. Temporal.PlainDate, Temporal.PlainTime, Temporal.PlainYearMonth,and Temporal.PlainMonthDay all carry less information and should be used whencomplete information is not required.

c
Temporal.PlainMonthDay

A Temporal.PlainMonthDay represents a particular day on the calendar, butwithout a year. For example, it could be used to represent a yearlyrecurring event, like "Bastille Day is on the 14th of July."

c
Temporal.PlainTime

A Temporal.PlainTime represents a wall-clock time, with a precision innanoseconds, and without any time zone. "Wall-clock time" refers to theconcept of a time as expressed in everyday usage — the time that you readoff the clock on the wall. For example, it could be used to represent anevent that happens daily at a certain time, no matter what time zone.

c
Temporal.PlainYearMonth

A Temporal.PlainYearMonth represents a particular month on the calendar. Forexample, it could be used to represent a particular instance of a monthlyrecurring event, like "the June 2019 meeting".

c
Temporal.TimeZone

A Temporal.TimeZone is a representation of a time zone: either anIANA time zone, includinginformation about the time zone such as the offset between the local timeand UTC at a particular time, and daylight saving time (DST) changes; orsimply a particular UTC offset with no DST.

c
Temporal.ZonedDateTime
No documentation available

Interfaces

I
Temporal.CalendarProtocol
No documentation available
I
Temporal.DifferenceOptions

Options to control the result of until() and since() methods inTemporal types.

I
Temporal.DurationArithmeticOptions

Options to control behavior of Duration.compare(), Duration.add(), andDuration.subtract()

I
Temporal.TimeZoneProtocol

A plain object implementing the protocol for a custom time zone.

Type Aliases

T
Temporal.ArithmeticOptions

Options for arithmetic operations like add() and subtract()

T
Temporal.AssignmentOptions

Options for assigning fields using with() or entire objects withfrom().

T
Temporal.CalendarLike

Any of these types can be passed to Temporal methods instead of a Temporal.Calendar.

T
Temporal.CalendarTypeToStringOptions
No documentation available
T
Temporal.ComparisonResult
No documentation available
T
Temporal.DateTimeUnit
No documentation available
T
Temporal.DateUnit
No documentation available
T
Temporal.DurationLike
No documentation available
T
Temporal.DurationOptions

Options for assigning fields using Duration.prototype.with() or entireobjects with Duration.from(), and for arithmetic withDuration.prototype.add() and Duration.prototype.subtract().

T
Temporal.DurationRoundTo

The round method of the Temporal.Duration accepts one requiredparameter. If a string is provided, the resulting Temporal.Durationobject will be rounded to that unit. If an object is provided, thesmallestUnit and/or largestUnit property is required, while otherproperties are optional. A string parameter is treated the same as anobject whose smallestUnit property value is that string.

T
Temporal.DurationTotalOf

Options to control behavior of Duration.prototype.total()

T
Temporal.InstantToStringOptions
No documentation available
T
Temporal.LargestUnit
No documentation available
T
Temporal.MonthCodeOrMonthAndYear
No documentation available
T
Temporal.MonthOrMonthCode
No documentation available
T
Temporal.OffsetDisambiguationOptions
No documentation available
T
Temporal.PlainDateISOFields
No documentation available
T
Temporal.PlainDateLike
No documentation available
T
Temporal.PlainDateTimeISOFields
No documentation available
T
Temporal.PlainDateTimeLike
No documentation available
T
Temporal.PlainMonthDayLike
No documentation available
T
Temporal.PlainTimeISOFields
No documentation available
T
Temporal.PlainTimeLike
No documentation available
T
Temporal.PlainYearMonthLike
No documentation available
T
Temporal.PluralUnit

When the name of a unit is provided to a Temporal API as a string, it isusually singular, e.g. 'day' or 'hour'. But plural unit names like 'days'or 'hours' are also accepted.

T
Temporal.RoundingMode
No documentation available
T
Temporal.RoundTo

round methods take one required parameter. If a string is provided, theresulting Temporal.Duration object will be rounded to that unit. If anobject is provided, its smallestUnit property is required while otherproperties are optional. A string is treated the same as an object whosesmallestUnit property value is that string.

T
Temporal.ShowCalendarOption
No documentation available
T
Temporal.SmallestUnit
No documentation available
T
Temporal.TimeUnit
No documentation available
T
Temporal.TimeZoneLike

Any of these types can be passed to Temporal methods instead of a Temporal.TimeZone.

T
Temporal.ToInstantOptions

Options for conversions of Temporal.PlainDateTime to Temporal.Instant

T
Temporal.ToStringPrecisionOptions

Options for outputting precision in toString() on types with seconds

T
Temporal.TotalUnit
No documentation available
T
Temporal.TransitionDirection

Options to control behaviour of ZonedDateTime.prototype.getTimeZoneTransition()

T
Temporal.YearOrEraAndEraYear
No documentation available
T
Temporal.ZonedDateTimeAssignmentOptions
No documentation available
T
Temporal.ZonedDateTimeISOFields
No documentation available
T
Temporal.ZonedDateTimeLike
No documentation available
T
Temporal.ZonedDateTimeToStringOptions
No documentation available

Variables

v
Temporal.Now

The Temporal.Now object has several methods which give information aboutthe current date, time, and time zone.