Template:Da/doc
Documentation
This template generates an anchor↗ (i.e., a target for incoming links) 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}}{{da|YYYY-MM-DD|text}}
The second form is for special cases where the anchor should be placed on text that does not match the anchor itself (see third example below).
Examples
{{da}}⇒ 2026-01-25{{da|2020-11-06}}⇒ 2020-11-06{{da|2015-12-04}}–{{da|2015-12-05|05}}⇒ 2015-12-04–05
Most browsers will not render anchors in any special way visually (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 examples create targets for incoming links to this page. 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 probably would not appear at the top of the browser window. This, of course, depends on your browser window size and font settings.)
The third example creates two anchors, the second of which, on the text "05", would be the target of a link to [[Template:Da/doc#2015-12-05]].
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