date-time →
previous-weekday-or-same(
    weekday: weekday
) → date

Returns a new date value corresponding to the occurrence of the weekday passed as a parameter preceding 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" | previous-weekday-or-same("Monday")  #"2024-01-15"

Kind: Function
Scope: temporal
Aliases: dateTime-to-previous-weekday-or-same


This site uses Just the Docs, a documentation theme for Jekyll.