Difference between revisions of "Template:Days after date"
(Created page with "<noinclude> ==Usage== Returns the numerical day of the month relative to a given date. The first three parameters are the year, month name, and day number of a date which is...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
The first three parameters are the year, month name, and day number of a date which is taken as the start of a week. | The first three parameters are the year, month name, and day number of a date which is taken as the start of a week. | ||
− | The fourth parameter is a number from 1 to 7 representing the day of the week | + | The fourth parameter is a number from 1 to 7 representing the day of the week. |
==Example== | ==Example== | ||
Line 48: | Line 48: | ||
{{Days after date|2400|February|28|5}} | {{Days after date|2400|February|28|5}} | ||
− | </noinclude><includeonly | + | </noinclude><includeonly>{{#expr:(({{{3}}} + {{{4}}} - 2) mod {{Days in month|{{{2}}}|{{{1}}}}}) + 1}}</includeonly> |
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 02:40, 4 March 2019
Usage
Returns the numerical day of the month relative to a given date.
The first three parameters are the year, month name, and day number of a date which is taken as the start of a week.
The fourth parameter is a number from 1 to 7 representing the day of the week.
Example
The following shorthand:
{{Days after date|2019|January|28|5}} {{Days after date|2019|February|28|5}} {{Days after date|2019|March|28|5}} {{Days after date|2019|April|28|5}} {{Days after date|2019|May|28|5}} {{Days after date|2019|June|28|5}} {{Days after date|2019|July|28|5}} {{Days after date|2019|August|28|5}} {{Days after date|2019|September|28|5}} {{Days after date|2019|October|28|5}} {{Days after date|2019|November|28|5}} {{Days after date|2019|December|28|5}} {{Days after date|2020|February|28|5}} {{Days after date|2100|February|28|5}} {{Days after date|2400|February|28|5}}
Produces:
1 4 1 2 1 2 1 1 2 1 2 1
3 4 3