Difference between revisions of "Template:As of/doc"

From SVR Wiki
Jump to: navigation, search
(added lower case param)
(Usage: updated)
Line 5: Line 5:
 
==Usage==
 
==Usage==
  
The template {{tlx|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 {{tlx|Start date}} template. Unlike the {{tlx|Update after}} template, <nowiki>{{As of}}</nowiki> does not require the editor to give a full date. This template should '''not''' be subst'd.
+
The template {{tlx|As of}} is used to mark potentially dated statements, and add an article in the appropriate "As of..." category. This allows editors to catalogue statements that may become dated over time. The date used for a given statement should be the current date (for currently valid statements) or the date on which the cited reference was produced (for example, when using census data). 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 {{tlx|Start date}} template. Unlike the {{tlx|Update after}} template, <tt>{&#123;As of&#125;}</tt> does not require the editor to give a full date. This template should '''not''' be subst'd.
  
 
==Syntax==
 
==Syntax==

Revision as of 17:59, 25 July 2008

Template:Template doc page viewed directly

Usage

The template {{As of}} is used to mark potentially dated statements, and add an article in the appropriate "As of..." category. This allows editors to catalogue statements that may become dated over time. The date used for a given statement should be the current date (for currently valid statements) or the date on which the cited reference was produced (for example, when using census data). 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 and case, if defined values for df and lc parameters are ignored
  • 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
  • lc (named parameter) – optional; gives lower case "as of [date]" text output with value 'on'

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"
{{As of|2008|7|5|lc=on}} returns "as of 5 July 2008"

See also