DifferenceOptions

external interface DifferenceOptions<T : DateTimeUnit<T>>(source)

Options to control the result of until() and since() methods in Temporal types.

Properties

Link copied to clipboard
abstract val largestUnit: LargestUnit<T>?

The largest unit to allow in the resulting Temporal.Duration object.

Link copied to clipboard
abstract val roundingIncrement: Int?

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
abstract val roundingMode: RoundingMode?

Controls how rounding is performed:

Link copied to clipboard
abstract val smallestUnit: SmallestUnit<T>?

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().