class Temporal.TimeZone
implements TimeZoneProtocol
import { Temporal } from "https://deno.land/x/deno@v1.40.5/cli/tsc/dts/lib.deno.unstable.d.ts";
const { TimeZone } = Temporal;
A Temporal.TimeZone
is a representation of a time zone: either an
IANA time zone, including
information about the time zone such as the offset between the local time
and UTC at a particular time, and daylight saving time (DST) changes; or
simply a particular UTC offset with no DST.
Temporal.ZonedDateTime
is the only Temporal type to contain a time zone.
Other types, like Temporal.Instant
and Temporal.PlainDateTime
, do not
contain any time zone information, and a Temporal.TimeZone
object is
required to convert between them.
See https://tc39.es/proposal-temporal/docs/timezone.html for more details.
Methods
equals(timeZone: TimeZoneLike): boolean
getInstantFor(dateTime: Temporal.PlainDateTime | PlainDateTimeLike | string, options?: ToInstantOptions): Temporal.Instant
getNextTransition(startingPoint: Temporal.Instant | string): Temporal.Instant | null
getOffsetNanosecondsFor(instant: Temporal.Instant | string): number
getOffsetStringFor(instant: Temporal.Instant | string): string
getPlainDateTimeFor(instant: Temporal.Instant | string, calendar?: CalendarLike): Temporal.PlainDateTime
getPossibleInstantsFor(dateTime: Temporal.PlainDateTime | PlainDateTimeLike | string): Temporal.Instant[]
getPreviousTransition(startingPoint: Temporal.Instant | string): Temporal.Instant | null
toJSON(): string
toString(): string
Static Methods
from(timeZone: TimeZoneLike): Temporal.TimeZone | TimeZoneProtocol