Temporal.Duration

interface

interface Temporal.Duration

variable

var Temporal.Duration: DurationConstructor

Properties

years

readonly years: number

months

readonly months: number

weeks

readonly weeks: number

days

readonly days: number

hours

readonly hours: number

minutes

readonly minutes: number

seconds

readonly seconds: number

milliseconds

readonly milliseconds: number

microseconds

readonly microseconds: number

nanoseconds

readonly nanoseconds: number

sign

readonly sign: number

blank

readonly blank: boolean

[Symbol.toStringTag]

readonly [Symbol.toStringTag]: "Temporal.Duration"

Methods

with

with(durationLike: PartialTemporalLike<DurationLikeObject>): Duration

negated

negated(): Duration

abs

abs(): Duration

add

add(other: DurationLike): Duration

subtract

subtract(other: DurationLike): Duration

round

round(roundTo: PluralizeUnit<"day" | TimeUnit>): Duration
round(roundTo: DurationRoundingOptions): Duration

total

total(totalOf: PluralizeUnit<"day" | TimeUnit>): number
total(totalOf: DurationTotalOptions): number

toString

toString(options?: DurationToStringOptions): string

toLocaleString

toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DurationFormatOptions): string

toJSON

toJSON(): string

valueOf

valueOf(): never