Difference between revisions of "Template:As of/doc"
From SVR Wiki
m (2 revisions imported: Importing As Of template and dependencies) |
(preliminary template documentation) |
||
(81 intermediate revisions by 52 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | <includeonly>{{template doc page transcluded}}</includeonly> |
− | {{ | + | <noinclude>{{template doc page viewed directly}}</noinclude> |
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | ||
==Usage== | ==Usage== | ||
− | |||
− | + | The template {{[[Template:As of|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]] (<code>class="updated"</code>) and [[HCalendar|hCalendar]] (<code>class="dtstart"</code>) [[microformat]]s through use of the {{[[Template:Start date|Start date]]}} template. Unlike the {{[[Template:Update after|Update after]]}} template, <nowiki>{{As of}}</nowiki> does not require the editor to give a full date. This template should '''not''' be subst'd. | |
− | |||
− | |||
==Syntax== | ==Syntax== | ||
− | |||
− | : | + | :<nowiki>{{ As of | year | month | day }}</nowiki> |
− | + | :<nowiki>{{ As of | month_name year }}</nowiki> (''deprecated'') | |
− | : | ||
− | + | ===Parameters=== | |
− | |||
− | |||
− | |||
'''Required''' | '''Required''' | ||
− | *'''year''' (first parameter) – must be in full numerical format (''yyyy'') | + | *'''year''' (first parameter) – required; must be in full numerical format (''yyyy'') |
+ | *:'''''month_name year''''' (first parameter, ''deprecated'') – required; month_name must be capitalised full name, and year must be in full numerical format (e.g. "April 2006") | ||
'''Optional''' | '''Optional''' | ||
− | *'''month''' (second parameter) – full, abbreviated or numerical | + | *'''month''' (second parameter) – optional; full, abbreviated or numerical (recommended) formats supported |
− | *'''day''' (third parameter) – numerical format only, not included in link | + | *'''day''' (third parameter) – optional; numerical format only, not included in link |
− | '''Named''' | + | '''Named optional''' |
− | *'''alt''' – optional; allows substitution of | + | *'''alt''' (named parameter) – optional; allows substitution of visible text output (defaults to "As of [date]") for different wording or use of lower case |
− | *'''df''' – optional; allows use of American date format with | + | *'''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=== | ===Examples=== | ||
− | |||
− | |||
− | |||
− | :< | + | :<nowiki>{{As of | 2008}}</nowiki> returns "''{{As of|2008}}''" |
− | |||
− | |||
− | :< | + | :<nowiki>{{As of | 2008 | 7}}</nowiki> returns "''{{As of|2008|7}}''" |
− | |||
− | |||
− | + | :<nowiki>{{As of | 2008 | 7 | 5}}</nowiki> returns "''{{As of|2008|7|5}}''" | |
− | {{ | + | |
− | < | + | :<nowiki>{{As of | 2008 | 7 | 5 | alt=from [[5 July]] onwards}}</nowiki> returns "''{{As of|2008|7|5|alt=from [[5 July]] onwards}}''" |
− | + | ||
− | + | :<nowiki>{{As of | 2008 | 7 | 5 | df=US}}</nowiki> returns "''{{As of|2008|7|5|df=US}}''" | |
− | + | ||
− | + | :<nowiki>{{As of | April 2006}}</nowiki> returns "''{{As of|April 2006}}''" | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | } | ||
− | </ | ||
==See also== | ==See also== | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
*[[Wikipedia:As of]] | *[[Wikipedia:As of]] | ||
*[[Wikipedia:Avoid statements that will date quickly]] | *[[Wikipedia:Avoid statements that will date quickly]] | ||
− | *[[:Category: | + | *[[Template:Update after]] |
+ | |||
+ | <includeonly> | ||
+ | <!-- ADD CATEGORIES BELOW THIS LINE --> | ||
+ | [[Category:Redirects from "As of"]] | ||
+ | [[Category:Time and date maintenance templates|{{PAGENAME}}]] | ||
+ | [[Category:Temporal templates|{{PAGENAME}}]] | ||
− | + | <!-- ADD INTERWIKIS BELOW THIS LINE --> | |
− | + | </includeonly> | |
− | |||
− | |||
− | |||
− |
Revision as of 20:27, 9 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
- {{ As of | year | month | day }}
- {{ As of | month_name year }} (deprecated)
Parameters
Required
- year (first parameter) – required; must be in full numerical format (yyyy)
- month_name year (first parameter, deprecated) – required; month_name must be capitalised full name, and year must be in full numerical format (e.g. "April 2006")
Optional
- month (second parameter) – optional; full, abbreviated or numerical (recommended) formats supported
- day (third parameter) – optional; numerical format only, not included in link
Named optional
- 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[update]"
- {{As of | 2008 | 7}} returns "As of July 2008[update]"
- {{As of | 2008 | 7 | 5}} returns "As of 5 July 2008[update]"
- {{As of | 2008 | 7 | 5 | df=US}} returns "As of July 5, 2008[update]"
- {{As of | April 2006}} returns "As of April 2006[update]"
See also