Template:Du

From Angelina Jordan Wiki

Documentation

This template formats dates according to readers' preferences. (Each person can see dates in their own preferred format, as explained below.) If no date is specified, it uses the current date. If the date is a significant one in Angelina's life, you should link it to the entry for that date in our Timeline by using the template {{d}} instead of this one.

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

Usage

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

The input need not be in this exact format (4-digit year, 2-digit month number, 2-digit day number) to be automatically converted to the reader's preference. As seen in the examples below, it just needs to be in a format recognized as a date by MediaWiki's {{#formatdate:}} parser function.

Examples

  • {{du}}2026-01-25
  • {{du|2020-11-06}}2020-11-06
  • {{du|6 November 2020}}6 November 2020
  • {{du|06 Nov 2020}}06 November 2020
  • {{du|11/06/2020}} ⇒ 11/06/2020
  • {{du|Autumn 2020}} ⇒ Autumn 2020

You should see at least some of these dates being rendered differently from the input. If you have specified a preference under "Date format" in the "Appearance" section of your own preferences, you will see most of these in whatever format you chose. If you have not set a preference, the default is to show the first two dates in "YYYY-MM-DD" format, the next two in "D MMM YYYY" format (with the presence or absence of a leading zero in the day number matching the input, and a fully spelled-out month). The last two examples illustrate how ambiguous and unrecognized input dates are shown unchanged.

If you "hover" on one of the rendered dates, you will see a "tooltip" showing it in "YYYY-MM-DD" format (assuming it was recognized as a date). This is true regardless of whether the input was already in that format, which is kind of annoying, but that's what MediaWiki does.

Here are all the formats that users can choose:

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

See also

  • {{d}} – formats a date and links it to the Timeline
  • {{da}} – formats a date and makes it an anchor for incoming links