Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.unstable.d.ts>Temporal.ZonedDateTime

A modern runtime for JavaScript and TypeScript.
Latest
class Temporal.ZonedDateTime
import { Temporal } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.unstable.d.ts";
const { ZonedDateTime } = Temporal;

Constructors

new
ZonedDateTime(
epochNanoseconds: bigint,
timeZone: string,
calendar?: string,
)

Properties

readonly
calendarId: string
readonly
day: number
readonly
dayOfWeek: number
readonly
dayOfYear: number
readonly
daysInMonth: number
readonly
daysInWeek: number
readonly
daysInYear: number
readonly
epochMilliseconds: number
readonly
epochNanoseconds: bigint
readonly
era: string | undefined
readonly
eraYear: number | undefined
readonly
hour: number
readonly
hoursInDay: number
readonly
inLeapYear: boolean
readonly
microsecond: number
readonly
millisecond: number
readonly
minute: number
readonly
month: number
readonly
monthCode: string
readonly
monthsInYear: number
readonly
nanosecond: number
readonly
offset: string
readonly
offsetNanoseconds: number
readonly
second: number
readonly
timeZoneId: string
readonly
weekOfYear: number | undefined
readonly
year: number
readonly
yearOfWeek: number | undefined
readonly
[Symbol.toStringTag]: "Temporal.ZonedDateTime"

Methods

equals(other: Temporal.ZonedDateTime | ZonedDateTimeLike | string): boolean
round(roundTo: RoundTo<
| "day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond"
>
): Temporal.ZonedDateTime
since(other: Temporal.ZonedDateTime | ZonedDateTimeLike | string, options?: Temporal.DifferenceOptions<
| "year"
| "month"
| "week"
| "day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond"
>
): Temporal.Duration
toJSON(): string
toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string
until(other: Temporal.ZonedDateTime | ZonedDateTimeLike | string, options?: Temporal.DifferenceOptions<
| "year"
| "month"
| "week"
| "day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond"
>
): Temporal.Duration
valueOf(): never