Template:FA
From Homestar Runner Wiki
(Difference between revisions)
It's dot com (Talk | contribs) (change date so that there will always be an example that spans two months) |
It's dot com (Talk | contribs) (return the correct year if the first week would cause problems) |
||
Line 1: | Line 1: | ||
- | <includeonly>{{#setvar:featured-article-date|{{#time:Y-m-d|{{{1|today}}} - {{#expr:{{#time:N|{{{1|today}}}}}-1}} days}}}}{{#setvar:featured-article-week|{{#expr:{{#time:W|{{#var:featured-article-date}}}}}}}}{{#time:[["HRWiki:Featured article for" | + | <includeonly>{{#setvar:featured-article-date|{{#time:Y-m-d|{{{1|today}}} - {{#expr:{{#time:N|{{{1|today}}}}}-1}} days}}}}{{#setvar:featured-article-week|{{#expr:{{#time:W|{{#var:featured-article-date}}}}}}}}{{#time:[["HRWiki:Featured article for" o, "week" {{#var:featured-article-week}}]] (M j"–"|{{#var:featured-article-date}}}}{{#ifeq:{{#time:M|{{#var:featured-article-date}}}}|{{#time:M|{{#var:featured-article-date}} + 6 days}}|{{#time:j|{{#var:featured-article-date}} + 6 days}}|{{#time:M j|{{#var:featured-article-date}} + 6 days}}}})</includeonly><noinclude>Returns the featured article of the current week or for the specified date. The specified date does not have to be the first day of the week. |
==Usage== | ==Usage== |
Revision as of 23:31, 16 June 2010
Returns the featured article of the current week or for the specified date. The specified date does not have to be the first day of the week.
Usage
{{FA}}
: HRWiki:Featured article for 2025, week 36 (Sep 1–7){{FA|next week}}
: HRWiki:Featured article for 2025, week 37 (Sep 8–14){{FA|30 Jan 2009}}
: HRWiki:Featured article for 2009, week 5 (Jan 26–Feb 1)