class Temporal.Duration
unstable
A Temporal.Duration
represents an immutable duration of time which can be
used in date/time arithmetic.
See https://tc39.es/proposal-temporal/docs/duration.html for more details.
Constructors Jump to heading
new
Jump to headingDuration(years?: number,months?: number,weeks?: number,days?: number,hours?: number,minutes?: number,seconds?: number,milliseconds?: number,microseconds?: number,nanoseconds?: number,)
Properties Jump to heading
readonly
Jump to heading[Symbol.toStringTag]: "Temporal.Duration"
readonly
Jump to headingblank: boolean
readonly
Jump to headingdays: number
readonly
Jump to headinghours: number
readonly
Jump to headingmicroseconds: number
readonly
Jump to headingmilliseconds: number
readonly
Jump to headingminutes: number
readonly
Jump to headingmonths: number
readonly
Jump to headingnanoseconds: number
readonly
Jump to headingseconds: number
readonly
Jump to headingsign: -1
| 0
| 1
readonly
Jump to headingweeks: number
readonly
Jump to headingyears: number
Methods Jump to heading
Jump to headingadd(other: ,options?: DurationArithmeticOptions,): Temporal.Duration
Jump to headinground(roundTo: DurationRoundTo): Temporal.Duration
Jump to headingsubtract(other: ,options?: DurationArithmeticOptions,): Temporal.Duration
Jump to headingtoJSON(): string
Jump to headingtoLocaleString(locales?: string | string[],options?: Intl.DateTimeFormatOptions,): string
Jump to headingtoString(options?: ToStringPrecisionOptions): string
Jump to headingtotal(totalOf: DurationTotalOf): number
Jump to headingvalueOf(): never
Jump to headingwith(durationLike: DurationLike): Temporal.Duration
Static Methods Jump to heading
Jump to headingcompare(): ComparisonResult
Jump to headingfrom(item: ): Temporal.Duration