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

Options for arithmetic operations like add() and subtract()

Properties

optional
overflow: "constrain" | "reject"

Controls handling of out-of-range arithmetic results.

If a result is out of range, then 'constrain' will clamp the result to the allowed range, while 'reject' will throw a RangeError.

The default is 'constrain'.

Back to top