Template:D/doc

From Angelina Jordan Wiki
Revision as of 18:52, 1 July 2024 by Dcljr (talk | contribs) (use {tne} and show all possible date formats)
This is a subpage documenting Template:D. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

Documentation

This template formats dates according to readers' preferences and links them to entries in our Timeline. If no date is specified, it uses the current date (which is almost certainly not what you want, since the link target would change each day). Dates that do not — and most likely will not ever — correspond to dates in the timeline can be formatted using {{du}} instead of this template.

The name of this template is based on the phrase "date".

Usage

  • {{d|YYYY-MM-DD}}
  • {{d|YYYY-MM-DD|linktext}}
  • {{d|YYYY-MM-DD|self=y}}
  • {{d|YYYY-MM-DD|linktext|self=y}}

The third and fourth forms create links to an anchor on the same page; this is mainly used for linking to related dates from other entries in our Timeline (i.e., intrapage links). The value y can actually be any true value.

Examples

"Hover" on the links to see the URLs being linked to.

Unless you have specified otherwise under "Date format" in the "Appearances" tab of your own preferences, you will see these examples rendered in the same "ISO date format" as the input shown in example template calls.

Here are all the formats that users can choose:

  • 2020-11-06
  • November 6, 2020
  • 6 November 2020
  • 2020 November 6

See also

  • {{da}} – formats a date and makes it an anchor for incoming links
  • {{du}} – formats a date but doesn't link it