next-weekday-or-same
date-time →
next-weekday-or-same(
weekday: weekday
) → date
Returns a new date value corresponding to the occurrence of the weekday passed as a parameter following the date passed as the argument except if this date corresponds to the expected weekday then it returns this date.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
weekday | weekday | Yes | The day of week to compare to the argument. |
Examples
#"2024-01-15" | next-weekday-or-same("Monday") → #"2024-01-15"
Kind: Function
Scope: temporal
Aliases: dateTime-to-next-weekday-or-same