DifferenceOptions
Options to control the result of until()
and since()
methods in Temporal
types.
Properties
Link copied to clipboard
The largest unit to allow in the resulting Temporal.Duration
object.
Link copied to clipboard
Allows rounding to an integer number of units. For example, to round to increments of a half hour, use { smallestUnit: 'minute', roundingIncrement: 30 }
.
Link copied to clipboard
Controls how rounding is performed:
Link copied to clipboard
The unit to round to. For example, to round to the nearest minute, use smallestUnit: 'minute'
. This property is optional for until()
and since()
, because those methods default behavior is not to round. However, the same property is required for round()
.