class Temporal.PlainTime
unstable
A Temporal.PlainTime
represents a wall-clock time, with a precision in
nanoseconds, and without any time zone. "Wall-clock time" refers to the
concept of a time as expressed in everyday usage — the time that you read
off the clock on the wall. For example, it could be used to represent an
event that happens daily at a certain time, no matter what time zone.
Temporal.PlainTime
refers to a time with no associated calendar date; if you
need to refer to a specific time on a specific day, use
Temporal.PlainDateTime
. A Temporal.PlainTime
can be converted into a
Temporal.PlainDateTime
by combining it with a Temporal.PlainDate
using the
toPlainDateTime()
method.
See https://tc39.es/proposal-temporal/docs/time.html for more details.
Constructors Jump to heading
new
Jump to headingPlainTime(hour?: number,minute?: number,second?: number,millisecond?: number,microsecond?: number,nanosecond?: number,)
Properties Jump to heading
readonly
Jump to heading[Symbol.toStringTag]: "Temporal.PlainTime"
readonly
Jump to headinghour: number
readonly
Jump to headingmicrosecond: number
readonly
Jump to headingmillisecond: number
readonly
Jump to headingminute: number
readonly
Jump to headingnanosecond: number
readonly
Jump to headingsecond: number
Methods Jump to heading
Jump to headingadd(durationLike: ,options?: ArithmeticOptions,): Temporal.PlainTime
Jump to headingequals(other: ): boolean
Jump to headinground(roundTo: RoundTo<"hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">): Temporal.PlainTime
Jump to headingsince(other: ,options?: DifferenceOptions<"hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">,): Temporal.Duration
Jump to headingsubtract(durationLike: ,options?: ArithmeticOptions,): Temporal.PlainTime
Jump to headingtoJSON(): string
Jump to headingtoLocaleString(locales?: string | string[],options?: Intl.DateTimeFormatOptions,): string
Jump to headingtoString(options?: ToStringPrecisionOptions): string
Jump to headinguntil(other: ,options?: DifferenceOptions<"hour"
| "minute"
| "second"
| "millisecond"
| "microsecond"
| "nanosecond">,): Temporal.Duration
Jump to headingvalueOf(): never
Jump to headingwith(timeLike: Temporal.PlainTime | PlainTimeLike,options?: AssignmentOptions,): Temporal.PlainTime
Static Methods Jump to heading
Jump to headingcompare(one: ,two: ,): ComparisonResult
Jump to headingfrom(item: ,options?: AssignmentOptions,): Temporal.PlainTime