TimeZone

external class TimeZone(timeZoneIdentifier: String)(source)

A Temporal.TimeZone is a representation of a time zone: either an {@link https://www.iana.org/time-zones|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.

Constructors

Link copied to clipboard
constructor(timeZoneIdentifier: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val id: String

Functions

Link copied to clipboard
fun getInstantFor(dateTime: PlainDateTime, options: ToInstantOptions = definedExternally): Instant
Link copied to clipboard
fun getNextTransition(startingPoint: Instant): Instant?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getPlainDateTimeFor(instant: Instant, calendar: CalendarLike = definedExternally): PlainDateTime
Link copied to clipboard
fun getPreviousTransition(startingPoint: Instant): Instant?
Link copied to clipboard
fun toJSON(): String