Template:ANEWS nav/doc
Appearance
This is a documentation subpage for Template:ANEWS nav. It may contain usage information, categories and other content that is not part of the original template page. |
This template produces links to the previous and next versions of the current month's administrators' newsletter.
Definitions
[edit]This is maybe the third time that I've used parser functions in a template, so I apologize for the rustiness of the implementation – it's rather difficult to read. Below are a few definitions that might aid in readability. Mz7 (talk) 04:06, 31 January 2020 (UTC)
this year = {{CURRENTYEAR}}
this month = {{#time: n}}
previous year = {{#expr: this year - 1}}
previous month = {{#expr: (((this month - 2) + 12) mod 12) + 1}}
next year = {{#expr: this year + 1}}
next month = {{#expr: ((this month) mod 12) + 1}}
if this month == 1, then
previous issue = [[Wikipedia:Administrators' newsletter/previous year/previous month]]
otherwise,
previous issue = [[Wikipedia:Administrators' newsletter/this year/previous month]]
current issue = [[Wikipedia:Administrators' newsletter/this year/this month]]
if this month == 12, then
next issue = [[Wikipedia:Administrators' newsletter/next year/next month]]
otherwise,
next issue = [[Wikipedia:Administrators' newsletter/this year/next month]]
See also
[edit]