Template:As of/doc: Difference between revisions

From USApedia
>Tomoneill
(includeonly)
(No difference)

Revision as of 09:53, 24 May 2019

This should not be confused with Template:As of?, which redirects to Template:When.

Template:As of on Wikipedia

The template {{as of}} is used to mark potentially dated statements, and will add an article to the appropriate hiddenWikipedia Logo.png sub-category of Category:All articles containing potentially dated statements. This allows editors to catalog 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 8601Wikipedia Logo.png format needed by hAtomWikipedia Logo.png (class="updated") and hCalendarWikipedia Logo.png (class="dtstart") microformatWikipedia Logo.pngs 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 substitutedWikipedia Logo.png.

This template generates a hyperlink in text where it is used.

Syntax

The template can be used in the following forms:

{{As of|year}}
{{As of|year|month}}
{{As of|year|month|day}}

Generally, specifying just the year or the year and month is preferred. If you specify a day, you will likely find that a category for dated information from that particular date does not yet exist, and that category name will appear in red at the bottom of the article, along with Category:Articles with invalid date parameter in template. In that case, you should follow the steps described under the Red link category appears heading below.

Please do not use {{As of|{{CURRENTYEAR}}|{{CURRENTMONTH}}}} or similar: that defeats the point of the template.

Several additional named parameters can also be used (see below).

Parameters

Required

  • year (first parameter) – must be in full numerical format (yyyy)

Optional

  • month (second parameter) – full, abbreviated or numerical formats supported (mm recommended)
  • day (third parameter) – numerical format only, not included in link (dd)

Named

  • alt – optional; allows substitution of different wording and case for the visible text output; if present but no value defined, this parameter is ignored; if a value is defined, any value for the lc parameter is ignored
  • lc – optional; gives lower case "as of date" when defined; recommended syntax is lc=y
  • url – optional; adds an inline external link suggesting a webpage for future editors to check for updates to the statement; use the full URL with no spaces. See Wikipedia:As ofWikipedia Logo.png for displaying links.

Examples

{{As of|2010}} — As of 2010[update]
{{As of|2010|7}} — As of July 2010[update]
{{As of|2010|7|5}} — As of July 5,  2010 (2010 -07-05)[update]
{{As of|2010|4|1|alt=as of the {{w|2010 United States Census}}}} — as of the 2010 United States CensusWikipedia Logo.png[update]
{{As of|2010|7|5|lc=y}} — as of July 5,  2010 (2010 -07-05)[update]
{{As of|2010|7|url=http://en.wikipedia.org/}} – As of July 2010[ref]

Red link category appears

When you use this template, you may see two new categories appear at the bottom of the article: a redlinked category like Category:Articles containing potentially dated statements from... and Category:Articles with invalid date parameter in template. This indicates that a category page for the year, year/month, or year/month/day has not yet been created.

To fix this, click on the redlinked category within the article, then click Create this page, and enter {{Articles containing potentially dated statements|year|month|day}}, omitting the |day if the category isn't for a specific day, and omitting the |month if the category isn't for a specific month.

  • Replace the year with the appropriate 4-digit year (e.g., 2016).
  • Replace the month, if used, with the appropriate full name of the month (e.g., February).
  • Replace the day, if used, with the appropriate day of the month, without leading zeros (e.g., 8).

See also


The template is used to mark potentially dated statements, and will add an article to the appropriate sub-category of Category:All articles containing potentially dated statements. Generally, specifying just the year or the year and month is preferred.

Template parameters

ParameterDescriptionTypeStatus
year1

must be in full numerical format (yyyy)

Example
2010
Unknownrequired
month2

Full, abbreviated or numerical formats supported (mm recommended)

Example
7
Unknownsuggested
day 3

numerical format only, not included in link (dd)

Example
5
Unknownoptional
altalt

allows substitution of different wording and case for the visible text output; if present but no value defined, this parameter is ignored; if a value is defined, any value for the lc parameter is ignored

Example
as of the {{w|2010 United States Census}}
Unknownoptional
lclc

gives lower case "as of date" when defined; recommended syntax is lc=y

Example
y
Unknownoptional
dfdf

no description

Unknownoptional
urlurl

dds an inline external link suggesting a webpage for future editors to check for updates to the statement; use the full URL with no spaces. See [[Wikipedia:As of]] for displaying links.

Example
http://en.wikipedia.org/
Unknownoptional