class Temporal.Instant
unstable
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.
For convenience of interoperability, it internally uses nanoseconds since
the Unix epoch (midnight
UTC on January 1, 1970). However, a Temporal.Instant can be created from
any of several expressions that refer to a single point in time, including
an ISO 8601 string with a
time zone offset such as '2020-01-23T17:04:36.491865121-08:00'.
See https://tc39.es/proposal-temporal/docs/instant.html for more details.
Constructors Jump to heading
new
Jump to headingInstant(epochNanoseconds: bigint)Properties Jump to heading
readonly
Jump to heading[Symbol.toStringTag]: "Temporal.Instant"readonly
Jump to headingepochMilliseconds: numberreadonly
Jump to headingepochNanoseconds: bigintMethods Jump to heading
Jump to headingadd(durationLike: Omit<Temporal.Duration | DurationLike, "years"
| "months"
| "weeks"
| "days"> | string): Temporal.InstantJump to headingequals(other: Temporal.Instant | string): booleanJump to headinground(roundTo: RoundTo<"hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">): Temporal.InstantJump to headingsince(other: Temporal.Instant | string,options?: DifferenceOptions<"hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">,): Temporal.DurationJump to headingsubtract(durationLike: Omit<Temporal.Duration | DurationLike, "years"
| "months"
| "weeks"
| "days"> | string): Temporal.InstantJump to headingtoJSON(): stringJump to headingtoLocaleString(locales?: string | string[],options?: Intl.DateTimeFormatOptions,): stringJump to headingtoString(options?: InstantToStringOptions): stringJump to headinguntil(other: Temporal.Instant | string,options?: DifferenceOptions<"hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">,): Temporal.DurationJump to headingvalueOf(): neverStatic Methods Jump to heading
Jump to headingcompare(one: Temporal.Instant | string,two: Temporal.Instant | string,): ComparisonResultJump to headingfrom(item: Temporal.Instant | string): Temporal.InstantJump to headingfromEpochMilliseconds(epochMilliseconds: number): Temporal.InstantJump to headingfromEpochNanoseconds(epochNanoseconds: bigint): Temporal.Instant