Skip to main content

PlainDateTime

class Temporal.PlainDateTime
unstable

A Temporal.PlainDateTime represents a calendar date and wall-clock time, with a precision in nanoseconds, and without any time zone. Of the Temporal classes carrying human-readable time information, it is the most general and complete one. Temporal.PlainDate, Temporal.PlainTime, Temporal.PlainYearMonth, and Temporal.PlainMonthDay all carry less information and should be used when complete information is not required.

See https://tc39.es/proposal-temporal/docs/datetime.html for more details.

Constructors Jump to heading

new
Jump to headingPlainDateTime(
isoYear: number,
isoMonth: number,
isoDay: number,
hour?: number,
minute?: number,
second?: number,
millisecond?: number,
microsecond?: number,
nanosecond?: number,
calendar?: string,
)

Properties Jump to heading

readonly
Jump to heading[Symbol.toStringTag]: "Temporal.PlainDateTime"
readonly
Jump to headingday: number
readonly
Jump to headingera: string | undefined
readonly
Jump to headingeraYear: number | undefined
readonly
Jump to headinghour: number
readonly
Jump to headingminute: number
readonly
Jump to headingmonth: number
readonly
Jump to headingsecond: number
readonly
Jump to headingweekOfYear: number | undefined
readonly
Jump to headingyear: number
readonly
Jump to headingyearOfWeek: number | undefined
Jump to headinground(roundTo: RoundTo<
"day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond"
>
): Temporal.PlainDateTime
Jump to headingsince(
options?: DifferenceOptions<
"year"
| "month"
| "week"
| "day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond"
>
,
): Temporal.Duration
Jump to headingtoLocaleString(
locales?: string | string[],
): string
Jump to headinguntil(
options?: DifferenceOptions<
"year"
| "month"
| "week"
| "day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond"
>
,
): Temporal.Duration

Static Methods Jump to heading

Back to top