Template:As of/doc: Difference between revisions
>Tomoneill (includeonly) |
(No difference)
|
Revision as of 09:53, 24 May 2019
![]() |
This is a documentation subpage for Template:As of
(see that page for the template itself). It contains usage information, categories, and other content that is not part of the original template page. |
This should not be confused with Template:As of?, which redirects to Template:When.
|
The template {{as of}}
is used to mark potentially dated statements, and will add an article to the appropriate hidden 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 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 substituted.
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 of
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[update]
- {{As of|2010|4|1|alt=as of the {{w|2010 United States Census}}}} — as of the 2010 United States Census
[update]
- {{As of|2010|7|5|lc=y}} — as of July 5, 2010[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
- As of
- Avoid statements that will date quickly
- Template:As of?
- Template:Category as of
- Template:Out of date
- Template:Show by date
- Template:Update
- Template:Update after
- Category:All articles containing potentially dated statements
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
year | 1 | must be in full numerical format (yyyy)
| Unknown | required |
month | 2 | Full, abbreviated or numerical formats supported (mm recommended)
| Unknown | suggested |
day | 3 | numerical format only, not included in link (dd)
| Unknown | optional |
alt | alt | 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
| Unknown | optional |
lc | lc | gives lower case "as of date" when defined; recommended syntax is lc=y
| Unknown | optional |
df | df | no description | Unknown | optional |
url | url | 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.
| Unknown | optional |