Skip to main content

Module Temporal

Module Temporal 

Source

Modules§

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

Structs§

CalendarTypeToStringOptions
Options for toString() on calendar types (PlainDateTime, PlainDate, etc.).
DifferenceOptions
Options to control the result of until() and since() methods.
DisambiguationOptions
The disambiguation option accepted by PlainDateTime.toZonedDateTime().
Duration
A Temporal.Duration represents an immutable duration of time which can be used in date/time arithmetic.
DurationLike
The duration fields accepted by Duration.from() and with(), each optional. At least one of them must be set.
DurationRoundToOptions
Options for Duration.round().
DurationTotalOptions
Options for Duration.total().
Instant
A Temporal.Instant is an exact point in time, with a precision in nanoseconds. No time zone or calendar information is present. Therefore, Temporal.Instant has no concept of days, months, or even hours.
InstantToStringOptions
Options for Instant.toString().
OverflowOptions
The overflow option accepted by from(), with(), add() and subtract().
PlainDate
A Temporal.PlainDate represents a calendar date without time or time zone information. For example, it could be used to represent an event on a calendar which happens during the whole day no matter which time zone it’s happening in.
PlainDateFields
The date fields accepted by PlainDate.with(), PlainMonthDay.with() and the toPlainDate() methods: era/era_year, year, month/month_code and day, each optional.
PlainDateLike
The property bag accepted by PlainDate.from(): the PlainDateFields plus calendar. from() requires year (or era and era_year), month (or month_code) and day.
PlainDateTime
A Temporal.PlainDateTime represents a calendar date and wall-clock time, with a precision in nanoseconds, and without any time zone.
PlainDateTimeFields
The date and time fields accepted by PlainDateTime.with(), each optional.
PlainDateTimeLike
The property bag accepted by PlainDateTime.from(): the PlainDateTimeFields plus calendar. from() requires year (or era and era_year), month (or month_code) and day. Omitted time fields default to zero.
PlainMonthDay
A Temporal.PlainMonthDay represents a particular day on the calendar, but without a year. For example, it could be used to represent a yearly recurring event, like “Bastille Day is on the 14th of July.”
PlainMonthDayLike
The property bag accepted by PlainMonthDay.from(): the PlainDateFields plus calendar. from() requires day and either month_code, or month together with year in calendars other than ISO 8601.
PlainTime
A Temporal.PlainTime represents a wall-clock time, with a precision in nanoseconds, and without any time zone or calendar information.
PlainTimeLike
The time fields accepted by PlainTime.from() and with(), each optional. from() requires at least one of them.
PlainYearMonth
A Temporal.PlainYearMonth represents a particular month on the calendar. For example, it could be used to represent a particular instance of a monthly recurring event, like “the June 2019 meeting”.
PlainYearMonthFields
The fields accepted by PlainYearMonth.with(): era/era_year, year and month/month_code, each optional.
PlainYearMonthLike
The property bag accepted by PlainYearMonth.from(): the PlainYearMonthFields plus calendar. from() requires year (or era and era_year) and month (or month_code).
RelativeToOptions
The relativeTo option, accepted by Duration.compare() directly and through the round() and total() options which extend this type.
RoundToOptions
Options for round() methods on Temporal types.
ShowCalendarOptions
Options for showing calendar in toString() output.
TimeZoneTransitionOptions
Options for ZonedDateTime.getTimeZoneTransition().
ToStringPrecisionOptions
Options for outputting precision in toString() on types with seconds.
ToZonedDateTimeItem
The object form of the PlainDate.toZonedDateTime() argument: a time zone and an optional time of day.
ZonedDateTime
A Temporal.ZonedDateTime is a timezone-aware, calendar-aware date/time object that represents a real event that has happened (or will happen) at a particular exact time from the perspective of a particular region on Earth.
ZonedDateTimeAssignmentOptions
Options for ZonedDateTime.from() and ZonedDateTime.with().
ZonedDateTimeFields
The date, time and offset fields accepted by ZonedDateTime.with(), each optional.
ZonedDateTimeLike
The property bag accepted by ZonedDateTime.from(): the ZonedDateTimeFields plus calendar and time_zone. from() requires time_zone, year (or era and era_year), month (or month_code) and day.
ZonedDateTimeToStringOptions
Options for ZonedDateTime.toString().

Enums§

CalendarDisplay
Calendar display option for toString() methods.
Disambiguation
Disambiguation mode for handling ambiguous times during DST transitions.
LargestUnit
A date or time unit, or Auto, as accepted by the largestUnit option.
OffsetDisplay
Offset display option for ZonedDateTime.toString().
OffsetOption
Offset disambiguation option for ZonedDateTime parsing and conversion.
Overflow
Overflow handling mode for Temporal assignment operations.
TimeZoneDisplay
Time zone display option for ZonedDateTime.toString().
TransitionDirection
Direction for getTimeZoneTransition().
Unit
A date or time unit, as accepted by the smallestUnit and unit options.