Template:Start-date

 (0009-11-01)

Documentation icon Documentation[view] [edit] [history] [purge]

This documentation is transcluded from Template:Start-date/doc.


Dat is an easy to read date and time template that emits proper microformat dates for events. For events where the time, day or month is not known, the user may omit these details.

Usage examplesEdit

Dat & End-date usage (colors for emphasis only):
Sample below displays 7 December 1941 (1941-12-07), and microformat date: 1941-12-07TZ

{{dat|7 December 1941}}

Sample below demonstrating how days, timezones and hours, minutes and seconds can be shown. (Order often not important). Displays 5:43PM HST, December 7, 1941 (1941-12-08 UTC03:43), and microformat date (corrected for UTC): 1941-12-08T03:43Z

{{dat|5:43PM HST, December 7, 1941}}

Sample below demonstrating use of links with dates. Displays links to day of month and year pages. December 7, 1941 (1941-12-07), and microformat date: 1941-12-07Z

{{dat|December 7, 1941|[[December 7]], [[1941]]}}

Sample below demonstrating use of Julian calendar dates. Displays 9 June [O.S. 30 May] 1672 (1692-06-09), and microformat date: 1692-06-09Z

{{dat|9 June 1692|{{OldStyleDate|9 June|1672|30 May}} }}

ParametersEdit

parameter 1 (required) The date and time to display and to emit as a microformat date. If year is absent, the current year is assumed. If day is missing, the first of the month is assumed. If hour, or minutes are missing, zero is assumed. If time zone is missing, UTC is assumed. Authors may specify time zones such as EDT, PST, HST and so on and these will be adjusted to UTC for microformat. A microcode date will be emitted in UTC form conforming to ISO8601. Gregorian calendar dates are required. Display in Julian or Chinese calendar date is possible using parameter 2.
parameter 2 (optional) If present, this wikitext is displayed rather than the date in parameter 1. These might be links to day of month or year pages. EG. December 7, 1941
ISO8601 (optional) if present, this ISO8601 date/time value is emitted instead of the value derived from parameter 1.
BCE (required for BCE dates) set to yes if the date is BC.

Ambiguous times and datesEdit

For the years 99 BC to 99AD especially, microformats may not be emitted properly unless expressed in the form YYYY-MM-DD. For users uninterested in microformats, it should be noted that this restriction has no known impacts other than microformat data which are currently invisible to users. The user of course may express the display form in the second parameter however they would like. Example: 1-2-3 is interpreted as February 3, 1 A.D, and emitted in that form via microformats when the user may have intended something else. Other 3 digit years may be misinterpreted as well, so best practice is to use leading zeros to make a 4 digit year for this date range. For example, February 274 will be interpreted as February 27, 2004. Instead, use "February 0274". Background: There is a good rationale for the behavior of the system function which actually does the hard work of this template. It is very unusual for people to mention such dates so long ago, so when we really mean this date, we must specify a 4 digit date. Outside of this period with ambiguous years, users may use free text dates without this restriction. Bot runs may make a conversion of non 4 digit years to 4 digits (with leading zeros) in order to refine Wikipedia's quality of microformat dates. These changes will not affect display, but for those curious, this is the rationale for such bot manipulations.

Information icon.svg This template employs some extremely complicated or esoteric features of template syntax.
Please do not attempt to alter it unless you are certain that you understand the setup and are prepared to repair/revert any consequent collateral damage if the results are unexpected. Any experiments should be conducted in the sandbox or your userspace.

Boarisch | Čeština | Deutsch | Deutsch (Sie-Form)‎ | English | Español | Français | Galego | Magyar | Italiano | Македонски | Nederlands | Polski | Português | Português do Brasil | Русский | Svenska | 中文(繁體)‎ | +/−

Last modified on 4 March 2009, at 05:45