Skip to main content
Temporal.DurationRoundTo - Temporal - Web documentation
type alias Temporal.DurationRoundTo
Unstable

The round method of the Temporal.Duration accepts one required parameter. If a string is provided, the resulting Temporal.Duration object will be rounded to that unit. If an object is provided, the smallestUnit and/or largestUnit property is required, while other properties are optional. A string parameter is treated the same as an object whose smallestUnit property value is that string.

Definition

SmallestUnit<DateTimeUnit> | (({ smallestUnit: SmallestUnit<DateTimeUnit>; largestUnit?: LargestUnit<DateTimeUnit>; } | { smallestUnit?: SmallestUnit<DateTimeUnit>; largestUnit: LargestUnit<DateTimeUnit>; }) & { roundingIncrement?: number; roundingMode?: RoundingMode; relativeTo?: ; })