Template:Da/doc

From Angelina Jordan Wiki
Revision as of 11:34, 6 January 2021 by Dcljr (talk | contribs) (doc created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a subpage documenting Template:Da. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

Documentation

This template generates an anchor (i.e., a link target) named for the specified date, and formats the date visually according to readers' preferences. If no date is specified, it uses the current date (which is probably not what you want, since the link target would change each day).

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

Usage

  • {{da|YYYY-MM-DD}}

Examples

  • {{da}}2026-01-25
  • {{da|2020-11-06}}2020-11-06

Most browsers will not render anchors in any special way (some text-only browsers do, but most graphical browers don't, for whatever reason). However, you may see a "tooltip" if you "mouseover" the dates in the examples above. This is caused by the id attribute of the <span> tag generated by the template.

These two examples create targets for incoming links to this page. For example, if another page on the wiki contained the link [[Template:Da/doc#2020-11-06]], then following that link would land you at the position on this page where "2020-11-06" appears above. (Usually this means that text would be at the very top of the browser window [or "viewport", whatever]. In this case, though, since the text is so far down the page, it most likely would not appear at the top of the browser window.)

See also

  • {{a}} – creates an anchor (not just for dates)
  • {{d}} – links and formats a date
  • {{du}} – formats a date but doesn't link it