Difference between revisions of "Template:Adt/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Vanisaac
m (→‎Usage: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
blackwiki>SMcCandlish
(misc. cleanup)
Line 2: Line 2:
 
<!-- Categories and interwikis go at the bottom of this page. -->
 
<!-- Categories and interwikis go at the bottom of this page. -->
 
{{subst only}}
 
{{subst only}}
'''Adt''' creates the 'accessdate' field and value for most {{C|Citation templates}}.
+
'''Adt''' creates the {{var|access-date}} parameter and value for most {{C|citation templates}}.
  
Access dates may be implemented in three formats and should be consistent throughout the article:
+
Access (retrieved) dates may be implemented in three formats and should be consistent throughout the article:
* {{var|D Month YYYY}}:{{pad|1em}}3<!--Don't use magicword here; need a 1-digit example.--> {{CURRENTMONTHNAME}} {{CURRENTYEAR}}{{pad|1em}}("DMY" – day followed by full month name, followed by year; no leading zeros)
+
* {{var|D Month YYYY}}:{{pad|1em}}3<!--Don't use magicword here; need a 1-digit example.--> {{CURRENTMONTHNAME}} {{CURRENTYEAR}}{{pad|1em}} ("DMY" – day followed by full month name, followed by year; no leading zeros)
* {{var|Month D, YYYY}}:{{pad|0.8em}}{{CURRENTMONTHNAME}} 3, {{CURRENTYEAR}}{{pad|0.7em}}("MDY" – full month name then day; comma separating the day and year; no leading zeros)
+
* {{var|Month D, YYYY}}:{{pad|0.8em}}{{CURRENTMONTHNAME}} 3, {{CURRENTYEAR}}{{pad|0.7em}} ("MDY" – full month name then day; comma separating the day and year; no leading zeros)
* {{var|YYYY-MM-DD}}:{{pad|1.4em}}{{CURRENTYEAR}}-{{CURRENTMONTH}}-03{{pad|3.8em}}("ISO" — all numeric, with 2-digit day and month)
+
* {{var|YYYY-MM-DD}}:{{pad|1.4em}}{{CURRENTYEAR}}-{{CURRENTMONTH}}-03{{pad|3.8em}} ("ISO" — all numeric, with 2-digit day and month)
  
 
===Usage===
 
===Usage===
This template MUST be subst'd.
+
This template '''must''' be [[Wikipedia:Template substitution|subst'd]].
  
When subst'd, the template provides the <code>accessdate</code> parameter name, the <code>=</code> sign, and the formatted date. You may specify a date format to be consistent with the other citations in the article:
+
When subst'd, the template provides the <code>access-date</code> parameter name, the <code>=</code> sign, and the formatted date. You may specify a date format to be consistent with the other citations in the article:
 
{| class="wikitable"
 
{| class="wikitable"
 
! Markup!! Generates !! Renders as
 
! Markup!! Generates !! Renders as
Line 22: Line 22:
 
{{pad|4px}}<code><nowiki>|{{subst:adt|iso}}</nowiki></code>
 
{{pad|4px}}<code><nowiki>|{{subst:adt|iso}}</nowiki></code>
 
| width="450px" |
 
| width="450px" |
{{pad|4px}}<code><nowiki>|accessdate=CURRENTDAY CURRENTMONTHNAME CURRENTYEAR</nowiki></code><br /><br /><br />
+
{{pad|4px}}<code><nowiki>|access-date=CURRENTDAY CURRENTMONTHNAME CURRENTYEAR</nowiki></code><br /><br /><br />
{{pad|4px}}<code><nowiki>|accessdate=CURRENTDAY CURRENTMONTHNAME CURRENTYEAR</nowiki></code><br /><br /><br />
+
{{pad|4px}}<code><nowiki>|access-date=CURRENTDAY CURRENTMONTHNAME CURRENTYEAR</nowiki></code><br /><br /><br />
{{pad|4px}}<code><nowiki>|accessdate=CURRENTMONTHNAME CURRENTDAY, CURRENTYEAR</nowiki></code><br /><br /><br />
+
{{pad|4px}}<code><nowiki>|access-date=CURRENTMONTHNAME CURRENTDAY, CURRENTYEAR</nowiki></code><br /><br /><br />
{{pad|4px}}<code><nowiki>|accessdate=CURRENTYEAR-CURRENTMONTH2-CURRENTDAY2</nowiki></code>
+
{{pad|4px}}<code><nowiki>|access-date=CURRENTYEAR-CURRENTMONTH2-CURRENTDAY2</nowiki></code>
 
| width="350px" |
 
| width="350px" |
{{pad|4px}}{{para|accessdate|{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}<br />{{pad|1em}}(default; the most common internationally)<br /><br />
+
{{pad|4px}}{{para|access-date|{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}<br />{{pad|1em}}(default; the most common internationally)<br /><br />
{{pad|4px}}{{para|accessdate|{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}<br />{{pad|1em}}(same as default)<br /><br />
+
{{pad|4px}}{{para|access-date|{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}<br />{{pad|1em}}(same as default)<br /><br />
{{pad|4px}}{{para|accessdate|{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}}}<br />{{pad|1em}}(chiefly [[American English|US]])<br /><br />
+
{{pad|4px}}{{para|access-date|{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}}}<br />{{pad|1em}}(chiefly [[American English|US]])<br /><br />
{{pad|4px}}{{para|accessdate|{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}}}<br />{{pad|1em}}([[ISO 8601]]; chiefly technical)
+
{{pad|4px}}{{para|access-date|{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}}}<br />{{pad|1em}}([[ISO 8601]]; chiefly technical)
 
|}
 
|}
 
Note that the template does not include the leading pipe (<code><nowiki>|</nowiki></code>); always precede <code><nowiki>{{subst:adt}}</nowiki></code> with a pipe character as in the examples above.
 
Note that the template does not include the leading pipe (<code><nowiki>|</nowiki></code>); always precede <code><nowiki>{{subst:adt}}</nowiki></code> with a pipe character as in the examples above.

Revision as of 00:08, 15 July 2020

Adt creates the access-date parameter and value for most Citation templates.

Access (retrieved) dates may be implemented in three formats and should be consistent throughout the article:

  • D Month YYYY: 3 November 2025  ("DMY" – day followed by full month name, followed by year; no leading zeros)
  • Month D, YYYY: November 3, 2025  ("MDY" – full month name then day; comma separating the day and year; no leading zeros)
  • YYYY-MM-DD: 2025-11-03  ("ISO" — all numeric, with 2-digit day and month)

Usage

This template must be subst'd.

When subst'd, the template provides the access-date parameter name, the = sign, and the formatted date. You may specify a date format to be consistent with the other citations in the article:

Markup Generates Renders as

 |{{subst:adt}}


 |{{subst:adt|dmy}}


 |{{subst:adt|mdy}}


 |{{subst:adt|iso}}

 |access-date=CURRENTDAY CURRENTMONTHNAME CURRENTYEAR


 |access-date=CURRENTDAY CURRENTMONTHNAME CURRENTYEAR


 |access-date=CURRENTMONTHNAME CURRENTDAY, CURRENTYEAR


 |access-date=CURRENTYEAR-CURRENTMONTH2-CURRENTDAY2

 |access-date=9 November 2025
 (default; the most common internationally)

 |access-date=9 November 2025
 (same as default)

 |access-date=November 9, 2025
 (chiefly US)

 |access-date=2025-11-09
 (ISO 8601; chiefly technical)

Note that the template does not include the leading pipe (|); always precede {{subst:adt}} with a pipe character as in the examples above.