Template:Adt
Revision as of 11:55, 28 February 2012 by blackwiki>Gadget850 (accessdate is not mandatory; three allowable formats)
Template:Tfd accessdate=2026-04-04
| This template should always be substituted (i.e., use {{subst:Adt}}). |
Adt creates the 'accessdate' field and value in YYYY-MM-DD format for most Citation templates.
Access dates may be implemented in three formats:
- YYYY-MM-DD: 2026-04-4
- MYD: April 4, 2026
- DMY: 4 April 2026
Access date formats should be consistent throughout the article.
Usage
This template MUST be subst'd.
When subst'd, the template provides the YYYY-MM-DD date field and word string
- "accessdate=CURRENTYEAR-CURRENTMONTH-CURRENTDAY" (all numeric with proper leading zero's)
Alternatively, it can be used to record an older date:
- "accessdate={{{3}}}-{{{2}}}-{{{1}}}", of which any one, two, or all three may be specified, and again will add proper leading zero's and format the output.
Examples
- |
{{subst:adt|three days ago}}— generates the string with the date of three days ago.
Given: |{{subst:adt|5}}it will generate:|accessdate=2026-04-05
- |
{{subst:adt|three days ago|lastmonth}}— generates the string with the date of three days ago, which was in the different last month.
Given: |{{subst:adt|3|10}}it will generate:|accessdate=2026-10-03
- "Last year"—has been left as an exercise for the pupil!
| The above documentation is transcluded from Template:Adt/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Subpages of this template. |