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

Template:End date/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:End date
This is the template sandbox page for Template:End date (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 93,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see Wikipedia:COinS.
This template uses Lua:
  • Module:Check for unknown parameters (sandbox)
  • Module:Date time (sandbox)

{{End date}} returns the date (or date and time) that an event or entity ended, in a standard format. It also includes a hidden (by CSS) duplicate, machine-readable date (or date and time) in the ISO date format, for use inside templates or table rows that emit microformats.

Contents

  • 1 Usage
  • 2 Parameters
  • 3 Examples
  • 4 TemplateData
  • 5 Use in microformats
    • 5.1 Example, including hidden machine-readable text
  • 6 Tracking categories
  • 7 See also

Usage

edit
  • {{End date|YYYY}} (year only)
  • {{End date|YYYY|MM}} (month and year)
  • {{End date|YYYY|MM|DD}} (year, month, and day)
  • {{End date|YYYY|MM|DD|HH|MM|SS|Time zone}} (date, time, and time zone)

Parameters

edit
  • The unnamed parameters, in order, represent the year (four digits), month (one or two digits), day (one or two digits), hour in 24-hour time (one or two digits), minutes (one or two digits), seconds (one or two digits), and the time zone (see below).
  • When specifying time of day, MM (minutes), SS (seconds), and the time zone are optional
  • Time zone may be a numerical value, or Z for UTC (see examples)
  • |df=yes, an optional parameter, can be set to display the day before the month (e.g. "7 November 2004" instead of the default "November 7, 2004"). The order of parameters does not change (it remains YMD). This is primarily used in articles using DMY format for dates.

Examples

edit
  • {{End date|1993}} → 1993 (1993)
  • {{End date|1993|02}} → February 1993 (1993-02)
  • {{End date|1993|02|24}} → February 24, 1993 (1993-02-24)
  • {{End date|1993|02|24|08|30}} → 08:30, February 24, 1993 (1993-02-24T08:30:00)
  • {{End date|1993|02|24|08|7=+01:00}} → 08:00, February 24, 1993 (+01:00) (1993-02-24T08:00:00+01:00)
  • {{End date|1993|02|24|08|7=−07:00}} → 08:00, February 24, 1993 (−07:00) (1993-02-24T08:00:00−07:00)
  • {{End date|1993|02|24|08|30|23}} → 08:30:23, February 24, 1993 (1993-02-24T08:30:23)
  • {{End date|1993|02|24|08|30|23|Z}} → 08:30:23, February 24, 1993 (UTC) (1993-02-24T08:30:23Z)
  • {{End date|1993|02|24|08|30|23|+01:00}} → 08:30:23, February 24, 1993 (+01:00) (1993-02-24T08:30:23+01:00)
  • {{End date|1993|02|24|08|30|23|−07:00}} → 08:30:23, February 24, 1993 (−07:00) (1993-02-24T08:30:23−07:00)
  • {{End date|1993|02|24|df=y}} → 24 February 1993 (1993-02-24)
  • {{End date|1993|02|24|08|30|df=yes}} → 08:30, 24 February 1993 (1993-02-24T08:30:00)

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 in articles based on its TemplateData.

TemplateData for End date

Date that an event or entity ended or was dissolved

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
YYYY1

End year

Numberrequired
MM2

End month

Numbersuggested
DD3

End day of month

Numbersuggested
HH4

End hours

Numberoptional
MM5

End minutes

Default
0
Numberoptional
SS6

End seconds

Default
0
Numberoptional
TZ7

Time zone offset, "+02:00", "-06:00" or "Z" for UTC

Lineoptional
Day firstdf

Set to 'yes' to show the day before the month name

Suggested values
yes y
Lineoptional

Use in microformats

edit

The template returns the date as hCalendar's (class="dtend"). For example:

<span class="dtend">1993-02-24T08:30</span>

Disable CSS or view source to see the hidden ISO-formatted output.

Note: due to the requirement exclusive dtend in hCalendar, and the accessibility problems that presents when a date is rendered (as seen without CSS) as 28 March 1999 (1999-03-29) or even 28 February 1999 (1999-03-01) or 31 December 1999 (2000-01-01), the template should not be used for whole-day dates and should have a time of 24:00:00 or 23:59:59.

See the microformats project for further details.

Example, including hidden machine-readable text

edit
  • {{End date|2016|12|31}} → December 31, 2016 (2016-12-31)
    December&nbsp;31,&nbsp;2016<span style="display: none;">&nbsp;(<span class="dtend itvend">2016-12-31</span>)</span>

Tracking categories

edit
  • Category:Pages using end date with unknown parameters (0)
  • Category:Pages using Module:Date time with invalid values (1)

See also

edit
  • {{Start date}}
  • {{Start and end dates}}
  • {{Trim date}}
  • v
  • t
  • e
Birth, death and age templates
birth, death, age
Combined BDA template Description / use 
{{BirthDeathAge}}Combines functions of {{Birth date}}, {{Birth date text}}, {{Birth date and age}}, {{Birth year and age}}, {{Death date}}, {{Death date text}}, {{Death date and age}}, and {{Death year and 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 age}}As {{Death date and age}}, but accepts dates in text form ('15 June 1950', 'June 15, 1950', 'June 1950', etc.).
{{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:End date/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:End_date/sandbox&oldid=1279750155"
Last edited on 10 March 2025, at 10:32

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 10 March 2025, at 10:32 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop