Template:Start and end dates
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 purpose of the {{start and end dates}} template is to return the date range during which an event transpired or an entity existed. It also includes duplicate, machine-readable date (or date-time) in the ISO date format (which is hidden by CSS), for use inside other templates (or table rows) which emit microformats. It should be used only once in each such template and never used outside such templates. The hidden date degrades gracefully when CSS is not available.
Usage
When not to use this template
Do not use this template for:
- dates that are uncertain e.g., "before 4 April 1933"; "around 18 November 1939".
- dates outside the range given under "Limitation", below.
- other, secondary dates
- outside microformat-emitting templates - if in doubt, see the parent template's documentation
- more than one date in any parent template
Syntax
{{start and end dates|year|month|day|year|month|day}}
Example: {{start and end dates|1939|9|1|1945|9|2}}
→ September 1, 1939 – September 2, 1945
Example (day first): {{start and end dates|1939|9|1|1945|9|2|df=yes}}
→ 1 September 1939 – 2 September 1945
Parameters
Start and end dates
<templatedata>{ "description": "Date that an event or entity started or was created and when it ended or was destroyed", "params": { "1": {"label": "YYYY", "description": "start year", "example": "1939", "type": "number"}, "2": {"label": "MM", "description": "start month", "example": "9", "inherits": "1"}, "3": {"label": "DD", "description": "start day of month","example": "1", "inherits": "1"}, "4": {"label": "YYYY", "description": "end year", "example": "1945", "type": "number"}, "5": {"label": "MM", "description": "end month", "example": "9", "inherits": "1"}, "6": {"label": "DD", "description": "end day of month", "example": "2", "inherits": "1"}, "df": {"label": "day first", "description": "boolean parameter to put the date before the month name", "default": "false", "example": "yes", "type": "string/line"} }}</templatedata>
Use in microformats
This template also returns the date, hidden by CSS, in the ISO 8601 format needed by one or more of the following microformats:
usually, but not always, within infobox or similar templates, or tables.
Its use in hCard is for organisations, venues and similar; use {{Birth date}} or {{Birth date and age}} for people.
Similarly, {{End date}} returns the date as hCalendar's (class="dtend"
).
See en:WP:UF for further details.
Limitation
This template has no provision to deal with a date in a non-Gregorian calendar. Also, ISO 8601 requires mutual agreement among those exchanging information before using years outside the range 1583–9999 CE. Therefore, use of this template for non-Gregorian dates or dates outside that range constitutes a false claim of conformance to the ISO 8601 standard.
Any editor encountering such usage should change the date to plain text with no template; or if not confident in doing so, raise the matter on this template's talk page.
See also
- {{start date}}
- {{end date}}
There are a number of templates that you can use to set out a person's birth date or birth year, current age, death date or death year, and age at death. This is especially useful in infoboxes. Using these templates rather than simply inserting dates into articles allow hidden metadata about dates to be put into articles. Web browsers and other types of software can look up the metadata and use them for certain types of displays or searches.
The year, month and day of birth and death dates must be typed in numbers. If a number is smaller than ten, you do not have to type a zero before it (for example, you can type "7" instead of "07").
All the templates
What you should type | Example | What you will see |
---|---|---|
{{Birth date|[year of birth]|[month of birth]|[day of birth]}} | {{Birth date|1965|8|9}}
|
August 9, 1965 |
{{Birth date and age|[year of birth]|[month of birth]|[day of birth]}} | {{Birth date and age|1965|8|9}}
|
August 9, 1965 |
{{Birth year and age|[year of birth]|[optional month of birth, if known]}} | {{Birth year and age|1965}}
|
1965 (age 58–59) |
{{Birth year and age|1965|8}}
|
August 1965 (age 59) | |
{{Death date|[year of death]|[month of death]|[day of death]}} | {{Death date|2005|12|25}}
|
December 25, 2005 |
{{Death date and age|[year of death]|[month of death]|[day of death]|[year of birth]|[month of birth]|[day of birth]}} | {{Death date and age|2005|12|25|1965|8|9}}
|
December 25, 2005 | (aged 40)
{{Death year and age|[year of death]|[year of birth]|[optional month of death, if known]}} | {{Death year and age|2005|1965}}
|
2005 (aged 39–40) |
{{Death year and age|2005|1965|12}}
|
December 2005 (aged 39–40) |
Notes
{{Birth date and age}} and {{Birth year and age}}
In {{Birth date and age}} and {{Birth year and age}}, the person's age is calculated based on the current date.
{{Birth year and age}} and {{Death year and age}}
The templates {{Birth year and age}} and {{Death year and age}} show a person's year of birth or death and his or her approximate (rough) age. The templates are useful when only the year of a person's birth and/or death are known, or if you do not want to state a person's full dates of birth and death for privacy reasons.
The person's age is estimated in the following way:
- {{Birth year and age}} – let us assume:
- that the person in question was born some time in 1969; and
- that the present date is 23 December 2024.
- If the person was born before 23 December 1969 then he will be 54 years old on 23 December 2024 as he has not had his 55th birthday yet. On the other hand, if he was born exactly on or before 23 December 1969, then he will be 55 years old.
- Therefore, the template
{{Birth year and age|1969}}
- displays his birth year and age as: 1969 (age 54–55)
- Therefore, the template
- {{Death year and age}} – let us assume:
- that the person in question was born some time in 1973; and
- that she died some time in 2023.
- We can think of two extremes: (1) that the person was born on 31 December 1973 and died on 1 January 2023, in which case she would have been 49 years old at the time of her death as she did not achieve her 50th birthday on 31 December 2023; and (2) that she was born on 1 January 1973 and died on 31 December 2023, in which case she would have been 50 years old at the time of her death as she had her 50th birthday on 1 January 2023.
- Therefore, the template
{{Death year and age|2023|1973}}
- shows her death year and age as: 2023 (aged 49–50)
- Therefore, the template
Templates allowing day to be shown before month
The templates in the table below take an optional parameter "df" (which stands for "date first") – you can choose whether to use it or not. If "df=yes", then the day of the date is shown before the month. This is for articles about people from parts of the world where the day usually comes before the month in a date.
What you should type | Example | What you will see |
---|---|---|
{{Birth date|[year of birth]|[month of birth]|[day of birth]|df=yes}} | {{Birth date|1965|8|9|df=yes}}
|
9 August 1965 |
{{Birth date and age|[year of birth]|[month of birth]|[day of birth]|df=yes}} | {{Birth date and age|1965|8|9|df=yes}}
|
9 August 1965 |
{{Death date|[year of death]|[month of death]|[day of death]|df=yes}} | {{Death date|2005|12|25|df=yes}}
|
25 December 2005 |
{{Death date and age|[year of death]|[month of death]|[day of death]|[year of birth]|[month of birth]|[day of birth]|df=yes}} | {{Death date and age|2005|12|25|1965|8|9|df=yes}}
|
25 December 2005 | (aged 40)
The above documentation is transcluded from Template:Start and end dates/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |