Skip to main content

Duration

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 headingminutes: number
readonly
Jump to headingmonths: number
readonly
Jump to headingseconds: number
readonly
Jump to headingsign:
-1
| 0
| 1
readonly
Jump to headingweeks: number
readonly
Jump to headingyears: number

Static Methods Jump to heading

Back to top