• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:End date text/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:End date text

 (0009-11-02)

This is the template sandbox page for Template:End date text (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:Check for unknown parameters (sandbox)

{{Start date text}}, {{Birth date text}}, {{End date text}}, and {{Death date text}} are easy to read "plain text" date and time templates that emit microformat dates for events. These templates are an alternative to the {{Start date}}/{{Birth date}} and {{End date}}/{{Death date}} templates that also emit microformats but require dates to be expressed as numbers, with a parameter for the year, another for the month, and so on. "Fuzzy" dates and times are supported. For events where the precise time, day or month is not known, the user may omit these details. Time zones are assumed to be local to the event. If time zone information is specified, the otherwise optional timezone parameter must be set.

Contents

  • 1 Examples
    • 1.1 Month / Day / Year
    • 1.2 Day / Month / Year
    • 1.3 Precise time
    • 1.4 Location
    • 1.5 Julian calendar dates
  • 2 Microformat output
  • 3 Parameters
  • 4 TemplateData
  • 5 Ambiguous times and dates
  • 6 Time zones
  • 7 Tracking categories
  • 8 See also

Examples

edit

Examples of {{Start date text}}, {{Birth date text}}, {{End date text}}, and {{Death date text}}.

Month / Day / Year

edit

Samples below display December 7, 1941 (1941-12-07), and emit hidden microformat date: 1941-12-07

  • {{Start date text|December 7, 1941}} → December 7, 1941 (1941-12-07)
  • {{Birth date text|December 7, 1941}} → December 7, 1941 (1941-12-07)
  • {{End date text|December 7, 1941}} → December 7, 1941 (1941-12-08)
  • {{Death date text|December 7, 1941}} → December 7, 1941 (1941-12-08)

Day / Month / Year

edit

Samples below display 7 December 1941 (1941-12-07), and emit hidden microformat date: 1941-12-07

  • {{Start date text|7 December 1941}} → 7 December 1941 (1941-12-07)
  • {{Birth date text|7 December 1941}} → 7 December 1941 (1941-12-07)
  • {{End date text|7 December 1941}} → 7 December 1941 (1941-12-08)
  • {{Death date text|7 December 1941}} → 7 December 1941 (1941-12-08)

Precise time

edit

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

  • {{Start date text|5:43PM HST, December 7, 1941|tz=y}} → 5:43PM HST, December 7, 1941 (1941-12-08UTC03:43Z)
  • {{Birth date text|5:43PM HST, December 7, 1941|tz=y}} → 5:43PM HST, December 7, 1941 (1941-12-08UTC03:43Z)
  • {{End date text|5:43PM HST, December 7, 1941|tz=y}} → 5:43PM HST, December 7, 1941 (1941-12-08UTC03:44Z)
  • {{Death date text|5:43PM HST, December 7, 1941|tz=y}} → 5:43PM HST, December 7, 1941 (1941-12-08UTC03:44Z)

Location

edit

Samples below demonstrate providing a location with local time to generate UTC value. Displays December 8, 1941 12:50PM Australia/Adelaide (1941-12-08UTC03:20Z), and emits hidden microformat date (corrected for UTC): 1941-12-08 T03:20Z

  • {{Start date text|December 8, 1941 12:50PM Australia/Adelaide|tz=y}} → December 8, 1941 12:50PM Australia/Adelaide (1941-12-08UTC03:20Z)
  • {{Birth date text|December 8, 1941 12:50PM Australia/Adelaide|tz=y}} → December 8, 1941 12:50PM Australia/Adelaide (1941-12-08UTC03:20Z)
  • {{End date text|December 8, 1941 12:50PM Australia/Adelaide|tz=y}} → December 8, 1941 12:50PM Australia/Adelaide (1941-12-08UTC03:21Z)
  • {{Death date text|December 8, 1941 12:50PM Australia/Adelaide|tz=y}} → December 8, 1941 12:50PM Australia/Adelaide (1941-12-08UTC03:21Z)

Julian calendar dates

edit

Samples below demonstrate use of Julian calendar dates. Displays 9 June [O.S. 30 May] 1672 (1672-06-09), and emits hidden microformat date: 1672-06-09

{{Start date text|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}} → 9 June [O.S. 30 May] 1672 (1672-06-09)
{{Birth date text|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}} → 9 June [O.S. 30 May] 1672 (1672-06-09)
{{End date text|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}}   → 9 June [O.S. 30 May] 1672 (1672-06-10)
{{Death date text|9 June 1672|{{OldStyleDate|9 June|1672|30 May}}}}   → 9 June [O.S. 30 May] 1672 (1672-06-10)

Microformat output

edit

Start date templates:

  • {{Start date text|31 December 2016}} → 31 December 2016 (2016-12-31)
    31 December 2016<span style="display:none">&#160;(<span class="dtstart ">2016-12-31</span>)</span>
  • {{Start date|2016|12|31|df=y}} → 31 December 2016 (2016-12-31)
    31&nbsp;December&nbsp;2016<span style="display: none;">&nbsp;(<span class="bday dtstart published updated itvstart">2016-12-31</span>)</span>

Birth date templates:

  • {{Birth date text|31 December 2016}} → 31 December 2016 (2016-12-31)
    31 December 2016<span style="display:none">&#160;(<span class="dtstart bday">2016-12-31</span>)</span>
  • {{Birth date|2016|12|31|df=y}} → (2016-12-31)31 December 2016
    <span style="display:none">(<span class="bday">2016-12-31</span>)</span>31 December 2016

End date templates:

  • {{End date text|31 December 2016}} → 31 December 2016 (2017-01-01)
    31 December 2016<span style="display:none">&#160;(<span class="dtend ">2017-01-01</span>)</span>
  • {{End date|2016|12|31|df=y}} → 31 December 2016 (2016-12-31)
    31&nbsp;December&nbsp;2016<span style="display: none;">&nbsp;(<span class="dtend itvend">2016-12-31</span>)</span>

Death date templates:

  • {{Death date text|31 December 2016}} → 31 December 2016 (2017-01-01)
    31 December 2016<span style="display:none">&#160;(<span class="dtend dday deathdate">2017-01-01</span>)</span>
  • {{Death date|2016|12|31|df=y}} → (2016-12-31)31 December 2016
    <span style="display:none">(<span class="dday deathdate">2016-12-31</span>)</span>31 December 2016

Parameters

edit
  • |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 or location is missing, the local time of the event discussed in the article is assumed. See timezone parameter if UTC time is desired. Authors may specify place names (see list) or time zones such as EDT, PST, HST and so on and these will be properly adjusted to UTC (Coordinated Universal Time) for transfer to other applications via microformat encoding. Gregorian calendar dates are required. Display in Julian or Chinese calendar date is possible using parameter 2.
  • |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.
  • |timezone= or |tz=: (required if timezone information specified) Set to yes if the time is UTC or if the location, timezone, or timezone offset is specified.

TemplateData

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:End date text in articles based on its TemplateData.

TemplateData for End date text

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
11

no description

Unknownrequired
22 display

no description

Unknownoptional
ISO8601ISO8601 dt

no description

Unknownoptional
tztz timezone

set to "yes" when timezone is present, or when timzone UTC is implicit

Booleanoptional
BCBC BCE

no description

Unknownoptional
class-extraclass-extra

no description

Unknownoptional

Ambiguous times and dates

edit

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.

Time zones

edit

Most time zone abbreviations as well as a large number of place names are recognized. (See recognized timezone values table.)

  • {{Start date text|December 7, 1941 8:43AM Pacific/Honolulu}} → December 7, 1941 8:43AM Pacific/Honolulu (1941-12-07UTC19:13)
  • {{Start date text|December 8, 1941 12:30PM Asia/Manila}} → December 8, 1941 12:30PM Asia/Manila (1941-12-08UTC04:30)

Tracking categories

edit

Template transclusions with invalid parameters:

  • Category:Pages using Start date text with unknown parameters (0)
  • Category:Pages using Birth date text with unknown parameters (2)
  • Category:Pages using End date text with unknown parameters (0)
  • Category:Pages using Death date text with unknown parameters (0)

Dates not in Wikidata:

  • Category:Date of birth not in Wikidata (25,268)
  • Category:Date of death not in Wikidata (1,372)
  • Category:Articles without Wikidata item (103)

See also

edit
  • {{Date-mf}}
  • v
  • t
  • e
Birth, death and age templates
birth, death, age
Birth templates Description / use 
{{Birth date}}To display a birth date and related hidden metadata.
{{Birth date text}}
{{Birth date and age}}{{Birth date}} with suffix '(age N)'.
{{Birth date and age2}}{{Birth date and age}} plus age as of a specified date.
{{Birth-date and age}}As {{Birth date and age}}, but accepts dates in text form ('15 June 1950', 'June 15, 1950', 'June 1950', etc.).
{{Birth date and age in years and days}}{{Birth date and age}}, but with the age displayed in years and days rather than just years.
{{Birth year and age}}Year of birth and approximate age.
{{Birth based on age as of date}}To display approximate birth year and current age given a particular date (e.g. when a dated reference mentions the age of a person), only works for living people.
{{Birth based on age as of dates}}To display approximate birth year and current age given several particular dates (e.g. when a dated reference mentions the age of a person), only works for living people.
{{Birth based on age at death}}To display approximate birth year based on age at death, or on age at a specific date if death date isn't known.
Death templates Description / use 
{{Death date}}To display a death date and related hidden metadata.
{{Death date text}}
{{Death date and age}}{{Death date}} with suffix '(aged N)'; also called with {{event date and age}}.
{{Death date and given age}}To display a death date and specified age.
{{Death year and age}}To display a year of, and approximate age at death.
age only
Conventional age templates Description / use 
{{Age in years, months, weeks and days}}Number of complete years, months, weeks and days between two dates.
{{Age in years, months and days}}Number of complete years, months and days between two dates.
{{Age in years and months}}Number of complete years and remaining months between two dates.
{{Age in years and days}}Number of complete years and remaining days between two dates.
{{Age in years and days nts}}{{Age in years and days}} with output formatted for use in number sortable tables.
{{Age in decimal years}}Number of years between two dates, rounded to the specified number of decimal places.
{{Age in years}}Number of years between two dates.
{{Age in years nts}}{{Age in years}} with output formatted for use in number sortable tables.
{{Age in months}}Number of months between two dates.
{{Age in weeks and days}}Number of weeks and days between two dates.
{{Age in weeks}}Number of weeks between two dates.
{{Age in days}}Age in days between two dates.
{{Age in days nts}}{{Age in days}} with output formatted for use in number sortable tables.
Reverse-determined age template Description / use 
{{Age}}Age based on number of complete years between two dates.
{{Age nts}}{{Age}} with output formatted for use in number sortable tables.
{{Age as of date}}Current age (in years) from a known age at a specified date.
{{Age for infant}}Current age for infant: months and days up to one year, years and months up to three years, and years beyond age 3.
start / end dates
Date-focused templates Description / use 
{{Start date}} / {{End date}}
{{Start date text}} / {{End date text}}
{{Start date and age}} / {{End date and age}}
miscellaneous
Template Description / use 
{{OldStyleDate}}Dates in Julian calendar.
{{OldStyleDateDY}}As {{OldStyleDate}} but used when Julian / Gregorian dates fall in different years.
{{OldStyleDateNY}}As {{OldStyleDate}} but without the year.
{{Unidentified for}}
{{Missing for}}
  • About age calculation templates
  • Date mathematics templates
The above documentation is transcluded from Template:Start date text/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:End_date_text/sandbox&oldid=1275525547"