PreviousWeekdayFromDate function
Returns the date of the specified day of the week that is the most recent day before the source date. The day of the week is specified as the full name, for example, thursday, or a three-letter abbreviation, for example, thu.
Namespace
datetime
Input
source date(date
|string
), day of the week(int
|string
)
Output
date(date
)
Example
If basedate
 contains the date 2008-08-18
 and Thursday
 is specified, then the two following functions are equivalent, and return the value 2008–08–14
:
set-column result datetime:PreviousWeekdayFromDate('2008-08-18', 'thursday')
set-column result datetime:PreviousWeekdayFromDate(basedate, 'thu')
Created in 2020 by Google Inc.