Difference between revisions of "Template:As of/doc"
From SVR Wiki
m (→Examples: dewikified link) |
(removing deprecated format (all instances converted)) |
||
Line 8: | Line 8: | ||
==Syntax== | ==Syntax== | ||
+ | |||
+ | The template can be used in the following forms: | ||
:<tt>{{As of{{!}}year{{!}}month{{!}}day}}</tt> | :<tt>{{As of{{!}}year{{!}}month{{!}}day}}</tt> | ||
− | :<tt>{{As of{{!}} | + | :<tt>{{As of{{!}}year{{!}}month}}</tt> |
+ | :<tt>{{As of{{!}}year}}</tt> | ||
+ | |||
+ | Several additional named parameters can also be used (see below). | ||
===Parameters=== | ===Parameters=== | ||
Line 16: | Line 21: | ||
'''Required''' | '''Required''' | ||
*'''year''' (first parameter) – required; must be in full numerical format (''yyyy'') | *'''year''' (first parameter) – required; must be in full numerical format (''yyyy'') | ||
− | |||
'''Optional''' | '''Optional''' | ||
Line 22: | Line 26: | ||
*'''day''' (third parameter) – optional; numerical format only, not included in link | *'''day''' (third parameter) – optional; numerical format only, not included in link | ||
− | '''Named | + | '''Named''' |
*'''alt''' (named parameter) – optional; allows substitution of visible text output (defaults to "As of [date]") for different wording or use of lower case | *'''alt''' (named parameter) – optional; allows substitution of visible text output (defaults to "As of [date]") for different wording or use of lower case | ||
*'''df''' (named parameter) – optional; allows use of American date format with value US, only visible to users who have not set their date preferences yet | *'''df''' (named parameter) – optional; allows use of American date format with value US, only visible to users who have not set their date preferences yet | ||
Line 34: | Line 38: | ||
:<tt>{{As of{{!}}2008{{!}}4{{!}}1{{!}}alt=as of the <nowiki>[[2000 United States Census]]</nowiki>}}</tt> returns "''as of the [[2000 United States Census]]''" | :<tt>{{As of{{!}}2008{{!}}4{{!}}1{{!}}alt=as of the <nowiki>[[2000 United States Census]]</nowiki>}}</tt> returns "''as of the [[2000 United States Census]]''" | ||
:<tt>{{As of{{!}}2008{{!}}7{{!}}5{{!}}df=US}}</tt> returns "''As of {{Start date|2008|7|5}}''" | :<tt>{{As of{{!}}2008{{!}}7{{!}}5{{!}}df=US}}</tt> returns "''As of {{Start date|2008|7|5}}''" | ||
− | |||
− | |||
==See also== | ==See also== |
Revision as of 01:54, 21 July 2008
Template:Template doc page viewed directly
Contents
Usage
The template {{As of}} is used to link a section of text to an appropriate "As of..." page without creating a visible link on the page itself. This allows editors to catalogue statements that may become dated over time. It also includes the ISO 8601 format needed by hAtom (class="updated"
) and hCalendar (class="dtstart"
) microformats through use of the {{Start date}} template. Unlike the {{Update after}} template, {{As of}} does not require the editor to give a full date. This template should not be subst'd.
Syntax
The template can be used in the following forms:
- {{As of|year|month|day}}
- {{As of|year|month}}
- {{As of|year}}
Several additional named parameters can also be used (see below).
Parameters
Required
- year (first parameter) – required; must be in full numerical format (yyyy)
Optional
- month (second parameter) – optional; full, abbreviated or numerical (recommended) formats supported
- day (third parameter) – optional; numerical format only, not included in link
Named
- alt (named parameter) – optional; allows substitution of visible text output (defaults to "As of [date]") for different wording or use of lower case
- df (named parameter) – optional; allows use of American date format with value US, only visible to users who have not set their date preferences yet
Examples
- {{As of|2008}} returns "As of 2008 "
- {{As of|2008|7}} returns "As of July 2008 "
- {{As of|2008|7|5}} returns "As of 5 July 2008 "
- {{As of|2008|4|1|alt=as of the [[2000 United States Census]]}} returns "as of the 2000 United States Census"
- {{As of|2008|7|5|df=US}} returns "As of July 5, 2008 "
See also
- Wikipedia:As of
- Wikipedia:Avoid statements that will date quickly
- Category:Articles containing potentially dated statements
- Template:Cat ASOF
- Template:Update after