Skip to main content
Temporal.ZonedDateTime - Temporal - Web documentation
class Temporal.ZonedDateTime
Unstable

Constructors

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

Properties

readonly
[Symbol.toStringTag]: "Temporal.ZonedDateTime"
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

Methods

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

Static Methods