模板:Weekday before date
外观
{{Weekday before date|Y|M|D|W}} returns the date of the first W (=Sunday, Monday, ..., Saturday) before the specified date with year Y, month M, and day of month D.
The first Sunday before 8月 17, 2024 is given by "{{Weekday before date|2024|8月|17|Sunday}}" as "错误:时间格式不正确".
Optionally you can format the output using the fifth parameter. For example the first Sunday before 8月 17, 2024 is given by "{{Weekday before date|2024|8月|17|Sunday|d M y}}" as "错误:时间格式不正确".
See also Template:Weekday after Julianday and Template:Weekday after date.