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 #
new
#PlainDateTime(isoYear: number,isoMonth: number,isoDay: number,hour?: number,minute?: number,second?: number,millisecond?: number,microsecond?: number,nanosecond?: number,calendar?: string,)Properties #
readonly
#[Symbol.toStringTag]: "Temporal.PlainDateTime"readonly
#calendarId: stringreadonly
#daysInMonth: numberreadonly
#daysInWeek: numberreadonly
#daysInYear: numberreadonly
#inLeapYear: booleanreadonly
#microsecond: numberreadonly
#millisecond: numberreadonly
#monthsInYear: numberreadonly
#nanosecond: numberreadonly
#weekOfYear: number | undefinedreadonly
#yearOfWeek: number | undefinedMethods #
#add(durationLike: ,options?: ArithmeticOptions,): Temporal.PlainDateTime#round(roundTo: RoundTo<"day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">): Temporal.PlainDateTime#since(other: ,options?: DifferenceOptions<"year"
| "month"
| "week"
| "day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">,): Temporal.Duration#subtract(durationLike: ,options?: ArithmeticOptions,): Temporal.PlainDateTime#toLocaleString(locales?: string | string[],options?: Intl.DateTimeFormatOptions,): string#toString(options?: CalendarTypeToStringOptions): string#toZonedDateTime(tzLike: TimeZoneLike,options?: ToInstantOptions,): Temporal.ZonedDateTime#until(other: ,options?: DifferenceOptions<"year"
| "month"
| "week"
| "day"
| "hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">,): Temporal.Duration#with(dateTimeLike: PlainDateTimeLike,options?: AssignmentOptions,): Temporal.PlainDateTime#withCalendar(calendar: CalendarLike): Temporal.PlainDateTime#withPlainTime(timeLike?: ): Temporal.PlainDateTimeStatic Methods #
#compare(one: ,two: ,): ComparisonResult#from(item: ,options?: AssignmentOptions,): Temporal.PlainDateTime