Difference between revisions of "Template:Adt"
Jump to navigation
Jump to search
Template documentation
blackwiki>PleaseStand (noinclude tfd) |
|||
| Line 3: | Line 3: | ||
-->{{<includeonly>subst:</includeonly>CURRENTMONTH}}-<!-- | -->{{<includeonly>subst:</includeonly>CURRENTMONTH}}-<!-- | ||
-->{{<includeonly>subst:</includeonly>CURRENTDAY2}}<noinclude> | -->{{<includeonly>subst:</includeonly>CURRENTDAY2}}<noinclude> | ||
| + | {{documentation|content= | ||
| + | {{subst only}} | ||
: '''Adt''' is designed to be used with most {{C|Citation templates}} by providing the proper syntax and fieldname for the standardized field 'accessdate' '''needed when citing an URL''' in most of those templates. | : '''Adt''' is designed to be used with most {{C|Citation templates}} by providing the proper syntax and fieldname for the standardized field 'accessdate' '''needed when citing an URL''' in most of those templates. | ||
===Usage=== | ===Usage=== | ||
| Line 18: | Line 20: | ||
#:'''<code><nowiki>|accessdate=</nowiki>{{CURRENTYEAR}}-10-03</code>''' | #:'''<code><nowiki>|accessdate=</nowiki>{{CURRENTYEAR}}-10-03</code>''' | ||
#''"Last year"''—has been left as an exercise for the pupil! | #''"Last year"''—has been left as an exercise for the pupil! | ||
| + | |||
| + | }} | ||
| + | |||
[[Category:Citation templates|{{PAGENAME}}]] | [[Category:Citation templates|{{PAGENAME}}]] | ||
| + | |||
</noinclude> | </noinclude> | ||
Revision as of 08:45, 28 February 2012
Template:Tfd accessdate=2026-04-08
| This template should always be substituted (i.e., use {{subst:Adt}}). |
- Adt is designed to be used with most Citation templates by providing the proper syntax and fieldname for the standardized field 'accessdate' needed when citing an URL in most of those templates.
Usage
This template MUST be subst'd.
When subst'd, the template provides the ISO 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
| 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. |
— 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!
}}