Template:Weekday after date
Jump to navigation
Jump to search
Usage
{{Weekday after date|Y|M|D|W|S}} uses the optional date format string S (defaults to "F d, Y") to return the date of the first W (=Sunday, Monday, ..., Saturday) after the specified date with year Y, month M (spelled out), and day of month D.
Examples
The first Sunday after November 11, 2024 is given by "{{Weekday after date|2024|November|11|Sunday}}" as "November 17, 2024".
In the following table, 25 May 2014 is a Sunday.
Syntax | What it looks like | Notes |
---|---|---|
{{Weekday after date|2014|May|25|Monday|d F Y}}
|
26 May 2014 | |
{{Weekday after date|2014|May|25|Tuesday|d F Y}}
|
27 May 2014 | |
{{Weekday after date|2014|May|25|Wednesday|d F Y}}
|
28 May 2014 | |
{{Weekday after date|2014|May|25|Thursday|Y-m-d}}
|
2014-05-29 | |
{{Weekday after date|2014|May|25|Friday|Y-m-d}}
|
2014-05-30 | |
{{Weekday after date|2014|May|25|Saturday|d F Y}}
|
31 May 2014 | |
{{Weekday after date|2014|May|25|Sunday|d F Y}}
|
01 June 2014 | When a starting date falls on the specified weekday, the resulting date will be one week later. |
{{Weekday after date|2014|05|25|Thursday|d F Y}}
|
Error: Invalid time. | Numeric month results in error |
See also
The above documentation is transcluded from Template:Weekday after date/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |