Difference between revisions of "Template:Active"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) (Replaced content with "<includeonly>{{#if:{{{1|}}}|{{#if:{{{2|}}}|{{#vardefine:i|{{{1}}}}}{{#while: |{{#ifexpr:{{#var:i}}<={{{2}}}|true}} |[[Category: Players active in {{#var:i}}]]{{#vardefine:...") Tag: Replaced |
Kevin Wang (talk | contribs) m |
||
Line 3: | Line 3: | ||
|[[Category: Players active in {{#var:i}}]]{{#vardefine:i|{{#expr:{{#var:i}}+1}}}} | |[[Category: Players active in {{#var:i}}]]{{#vardefine:i|{{#expr:{{#var:i}}+1}}}} | ||
}}|[[Category: Players active in {{{1}}}]]}}}} | }}|[[Category: Players active in {{{1}}}]]}}}} | ||
− | </includeonly><noinclude>Shorthand for adding active years for | + | </includeonly><noinclude>Shorthand for adding active years for players. |
*{{{1}}} - start year (inclusive) | *{{{1}}} - start year (inclusive) |
Revision as of 09:25, 22 March 2021
Shorthand for adding active years for players.
- {{{1}}} - start year (inclusive)
- {{{2}}} - end year (inclusive; optional)
End year can be up to 25 years after start year.
Usage:
input | output |
---|---|
{{active|2005}} | [[Category: Players active in 2005]] |
{{active|2005|2005}} | [[Category: Players active in 2005]] |
{{active|2005|2004}} | n/a |
{{active|2005|2006}} | [[Category: Players active in 2005]] [[Category: Players active in 2006]] |
{{active|2005|2007}} | [[Category: Players active in 2005]] [[Category: Players active in 2006]] [[Category: Players active in 2007]] |
{{active|2005|2008}} | [[Category: Players active in 2005]] [[Category: Players active in 2006]] [[Category: Players active in 2007]] [[Category: Players active in 2008]] |