Temporal.ZonedDateTime - Web documentation
class Temporal.ZonedDateTime
Unstable

Constructors

new
ZonedDateTime(
epochNanoseconds: bigint,
timeZone: TimeZoneLike,
calendar?: CalendarLike,
)

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
epochMicroseconds: bigint
readonly
epochMilliseconds: number
readonly
epochNanoseconds: bigint
readonly
epochSeconds: number
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
readonly
year: number
readonly
yearOfWeek: number

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