See DurationValues type for valid fields. All fields optional.
Static
isStatic
ofReturn a Duration constructed from the provided count and DurationUnit
The number of units the duration should represent
The time unit to create this duration from e.g. 'days' | 'hours' | 'minutes' | 'seconds' | 'milliseconds'
A new Duration
Static
parseReturn the duration value converted to the target unit
The target duration unit
The numerical value of this duration in the specified unit
Converts this duration to an integer of the target unit. Remainder values will be truncated.
The target duration unit
The truncated integer value of the duration converted to the target unit
Represents this duration as a values object where the length of the duration is distributed across the various units from largest to smallest
DurationValues
Represents this duration as a values object where each value represents the total integer size of the duration expressed as that unit.
DurationTotals
Duration
Optional
orEqual: booleanoptional
boolean
Duration
Optional
orEqual: booleanoptional
boolean
Generated using TypeDoc
Construct a new duration from a parameter object representing the duration unit values.