Skip to main content
type alias Temporal.DurationRoundTo

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?: ; })