Template:Infobox person/death
Appearance
![]() | This template uses Lua: |
![]() | This template is used on approximately 485,000 pages, or roughly 1% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
![]() | This template is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
![]() | This template is currently protected from editing. See the protection policy and protection log for more details. Please discuss any changes on the talk page; you may submit an edit request to ask an administrator to make an edit if it is uncontroversial or supported by consensus. You may also request that this page be unprotected. |
Works alongside {{Infobox person/birth}}.
Usage
{{Infobox
...
| label# = Died
| data# = {{#if: {{{death_date|}}} | {{Infobox person/death|{{{birth_date|}}}|{{{death_date|}}} }} }}
...
}}
Or
{{Infobox
...
| label# = Died
| data# = {{br separated entries
|1={{#if:{{{death_date|}}} | {{Infobox person/death|{{{birth_date|}}}|{{{death_date}}} }} }}
|2={{#if:{{{death_place|}}}|<div class="deathplace">{{{death_place|}}}</div>}}
}}
...
}}
Test cases
death_date only (birth_date is nil)
These test cases are for living people with no {{{death_date}}}
set
- Year only
{{Infobox person/death||1990}}
→ 1990{{Infobox person/death||Unknown}}
→ Unknown{{Infobox person/death| |1990}}
→ 1990
- Month and year only
{{Infobox person/death||Jan 1983}}
→ Jan 1983{{Infobox person/death||October 1965}}
→ October 1965{{Infobox person/death||October 1965 or November 1966}}
→ October 1965 or November 1966
- Full death_date set
{{Infobox person/death||Nov 7, 1993}}
→ November 7, 1993{{Infobox person/death||November 7, 1993}}
→ November 7, 1993{{Infobox person/death||7 Nov 1993}}
→ 7 November 1993{{Infobox person/death||7 November 1993}}
→ 7 November 1993{{Infobox person/death||Apr 25, 1993}}
→ April 25, 1993{{Infobox person/death||April 25, 1993}}
→ April 25, 1993{{Infobox person/death||25 Apr 1993}}
→ 25 April 1993{{Infobox person/death||25 April 1993}}
→ 25 April 1993
- Deal with references or extra text
{{Infobox person/death||12 Mar 1986 (best known)}}
→ 12 Mar 1986 (best known){{Infobox person/death||1986 (circa)}}
→ 1986 (circa){{Infobox person/death||June 1975<ref>some citation</ref>}}
→ June 1975[1]{{Infobox person/death||18 Dec 1975<ref>citation goes here</ref>}}
→ 18 Dec 1975[2]
- Example references
- Already using one of the {{death date}} templates. Note that in these cases the code does NOT parse, it simply returns the original values passed in.
{{Infobox person/death||
→ 25 April 1993{{death date text|25 April 1993}}
}}{{Infobox person/death||
→ (aged 25){{Death date and given age|1846|01|04|25}}
}}
birth_date and death_date are set
These test cases are for living people with no {{{death_date}}}
set
- Year only
{{Infobox person/death|1990|2020}}
→ 2020 (aged 29–30){{Infobox person/death| 1990| 2020}}
→ 2020 (aged 29–30){{Infobox person/death|1790|2020}}
→ 2020 (aged 229–230) invalid year, age > 130
- Month and year only
{{Infobox person/death|Jan 1983|2012}}
→ 2012{{Infobox person/death|1965|Nov 2015}}
→ November 2015 (aged 49–50){{Infobox person/death|unknown|Nov 2015}}
→ Nov 2015{{Infobox person/death|October 1965|Nov 2015}}
→ November 2015 (aged 50){{Infobox person/death|April 1665|Nov 2015}}
→ Error: Invalid dates for calculating age
- Full dates set
{{Infobox person/death|Nov 7, 1993|Nov 25, 2014}}
→ November 25, 2014 (aged 21){{Infobox person/death|1993|Nov 25, 2014}}
→ November 25, 2014 (aged 20–21){{Infobox person/death|1853|Nov 25, 2014}}
→ Error: Invalid dates for calculating age{{Infobox person/death|Dec 1993|Nov 25, 2014}}
→ November 25, 2014 (aged 20){{Infobox person/death|25 Jan 1914|2014}}
→ 2014 (aged 99–100){{Infobox person/death|November 7, 1993|December 12, 2014}}
→ December 12, 2014 (aged 21){{Infobox person/death|7 Nov 1693|8 Apr 1995}}
→ Error: Invalid dates for calculating age{{Infobox person/death|7 Nov 1993|8 Apr 1995}}
→ 8 April 1995 (aged 1){{Infobox person/death|7 November 1993|8 April 1995}}
→ 8 April 1995 (aged 1)
- Odd Cases
{{Infobox person/death|Unknown|1995}}
→ 1995{{Infobox person/death|Unknown|8 April 1995}}
→ 8 April 1995{{Infobox person/death|1960s|8 April 1995}}
→ 8 April 1995
- Deal with references or extra text
{{Infobox person/death|12 Mar 1986 (best known)|12 Apr 2020 (covid)}}
→ 12 Apr 2020 (covid){{Infobox person/death|1456 (circa)|1510 (approx)}}
→ 1510 (approx){{Infobox person/death|June 1975<ref>some citation</ref>|December 1995<ref>some death citation</ref>}}
→ December 1995[2]
- Example references
- Already using one of the {{death date}} and/or {{birth_date}} templates. Note that in these cases the code does NOT parse, it simply returns the original values passed in.
{{Infobox person/death|{
→ 17 November 2008 (aged 15){{birth-date|25 April 1993}}
|{{d-da|17 November 2008|25 April 1993}}
}}{{Infobox person/death|{
→ June 17, 2009 (aged 15){{birth date|1994|5|16}}
|{{dda|2009|6|17|1994|5|16}}
}}