Template:Death-date and age
Sarna News

- Boxing The Black Remnant with Jerry "Tycho" Holkins
- VoidBreaker Review - How Clan Sea Fox Ended the Dark Age
- Bad 'Mechs - Thresher Mk II
- HEXTECH Wave 9 Review - Winding Rivers, Tall Walls, and Underground Tunnels
- Hired Steel and Making MechWarrior 5: Clans Cinematics with Constantin & Bernhard of TMC
- Read more →
This template uses Lua: |
{{Death-date and age}} displays a person's date of death and age at that date. Besides calculating the age at death, the benefit of using this template is to allow for the inclusion of hidden microformat dates, which may be indexed or searched by software tools.
Note: The template may not calculate the age at death correctly if full dates (month, day, year) are not provided. For example, a person who was born in 1941 and died in 1993 could have been either 51 or 52 on the day of their death, depending on whether they had reached their birthday in their death year:
{{Death-date and age|1993|1941}}
→ 1993 (aged 52){{Death-date and age|May 1993|May 1941}}
→ May 1993 (aged 52)
When only the years are known, consider using {{Death year and age}} instead:
{{Death year and age|1993|1941}}
→ 1993 (aged 51–52){{Death year and age|1993|1941|5}}
→ May 1993 (aged 51–52)
Contents
Usage[edit]
- Format
{{Death-date and age| death date | birth date }}
{{Death-date and age| death date | birth date | death date display form with links, templates etc. }}
Examples[edit]
Month first format: Sample below displays February 24, 1993, with invisible microformat dtend date: 1993-02-25
(aged 51)
|
Day first format: Sample below displays 24 February 1993, with invisible microformat dtend date: 1993-02-25
(aged 51)
|
Year only, year and month only: Sample below displays 1993, with invisible microformat dtend date: 1994
(aged 52)
|
Julian dates demo. Sample below displays 30 May 1672, with invisible microformat dtend date: 1672-06-10
(aged 49)
|
Extreme dates: birth date is BC, death date AD. Sample below displays August 19, 14 AD, with invisible microformat dtend date: 0014-08-20
(aged 75)
|
Microformat output[edit]
Death date and age templates:
{{Death-date and age|31 December 2016|1 January 1980}}
→ 31 December 2016 (aged 36)31 December 2016<span style="display:none"> (<span class="dtend dday deathdate">2017-01-01</span>)</span> (aged 36)
{{Death date and age|2016|12|31|1980|1|1|df=y}}
→ 31 December 2016 (aged 36)31 December 2016<span style="display:none">(2016-12-31)</span> (aged 36)
Parameters[edit]
{{Death-date and age|death date|birth date|additional parameters}}
Parameter | Default | ||
---|---|---|---|
(required) | 1 | Death date. May be year only, year and month, year month and day, expressed in natural formats: e.g.: 24 August 1953, 1955-08-25, Sunday, December 7, 1941. If parameter three is not specified, the death date is displayed in exactly this format. This value as well as parameter 2 may not include links. If links or templates that do not evaluate as recognizable dates are desired, use parameter 3. | – |
(required) | 2 | Birth date. For accurate results, if year and month only was specified for death date, year and month should be specified for birth date (that is, the degree of precision should be in agreement). Julian dates may be used, but both Death and Birth dates must be on the same calendar. | – |
(optional) | 3 | The death date to display. This may include links or templates, or any combination of them, and overrides parameter 1. | parm 1 |
(optional) | bce | If birth date is BC, set to "b". If birth and death date are BC, set to "bd" or "d". | – |
(optional) | gregorian | If Julian dates are used, this parameter is required. The date provided is used for emitting the correct microformat translation of the death date. | parm 1 |
(optional) | dt | This value if present is the ISO8601 value emitted to indicate microformat death (dtend) date. It overrides any calculated value. | – |