clamp
date-time →
clamp(
min: date-time,
max: date-time
) → date-time
Returns the value of an argument dateTime, unless it is before min (in which case it returns min), or after max (in which case it returns max).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
min | date-time | Yes | value returned in case the argument value is before than it |
max | date-time | Yes | value returned in case the argument value is after than it |
Examples
#"2024-01-15 12:30:00" | clamp(#"2024-01-01 00:00:00", #"2024-01-31 00:00:00") → #"2024-01-15 12:30:00"
Kind: Function
Scope: temporal
Aliases: dateTime-to-clamp, dateTime-to-clip