Temporal.Duration - Web documentation
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

new
Duration(
years?: number,
months?: number,
weeks?: number,
days?: number,
hours?: number,
minutes?: number,
seconds?: number,
milliseconds?: number,
microseconds?: number,
nanoseconds?: number,
)

Properties

readonly
[Symbol.toStringTag]: "Temporal.Duration"
readonly
blank: boolean
readonly
days: number
readonly
hours: number
readonly
microseconds: number
readonly
milliseconds: number
readonly
minutes: number
readonly
months: number
readonly
nanoseconds: number
readonly
seconds: number
readonly
sign:
-1
| 0
| 1
readonly
weeks: number
readonly
years: number

Methods

Static Methods