WikiProject iconTime Template‑class High‑importance
WikiProject iconThis template is within the scope of WikiProject Time, a collaborative effort to improve the coverage of Time on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
HighThis template has been rated as High-importance on the project's importance scale.
Microformats
Death date and age is part of, or of interest to, WikiProject Microformats, which encourages the deployment of microformats in Wikipedia, and documents them in the article space. If you would like to participate, visit the project page.

Template-protected edit request on 5 July 2020 edit

My request is that - instead of 'Died' it should be 'Disappeared' in the main page that appears in Google or inside the page in Wikipedia in side bar (as devotees never died they appear and disappear from this material world when their role reaches climax). Thank you !! Satyam BCS (talk) 17:57, 5 July 2020 (UTC)Reply

  Not done: first, we have no control over what Google displays; second, the terms we use for living and dying are pretty standard, and we don't whitewash things or use flowery language. Primefac (talk) 18:05, 5 July 2020 (UTC)Reply

Sort by year? edit

I am using this template in a list, and would like it to sort in chronological order. A condensed sampling of the table is below. Clicking to sort the "Date and death of age" parameter orders them by the name of the month. Is there a way to make them order in actual chronological order? If not, is there a template that does this? BD2412 T 16:34, 20 May 2022 (UTC)Reply

Judge Date of birth Confirmation date Date of death and age
Francis Hopkinson (1737-09-21)September 21, 1737 September 26, 1789 Error: Need valid death date (first date): year, month, day
Henry Marchant (1741-04-09)April 9, 1741 July 3, 1790 Error: Need valid death date (first date): year, month, day
William Paca (1740-10-31)October 31, 1740 February 10, 1790 Error: Need valid death date (first date): year, month, day
John Sitgreaves 1757 (1757) December 20, 1790 Error: Need valid death date (first date): year, month, day
John Stokes (1756-03-20)March 20, 1756 August 3, 1790 Error: Need valid death date (first date): year, month, day
John Sullivan (1740-02-17)February 17, 1740 September 26, 1789 Error: Need valid death date (first date): year, month, day
James Wilson (1742-09-14)September 14, 1742 September 29, 1789 Error: Need valid death date (first date): year, month, day
This seems to me to be a flaw in the design of the {{Birth date}} and {{Death date and age}} templates.
As a separate issue, at least the table line for Francis Hopkinson misuses the Birth date template. It uses the date 21 September 1737, which according to the article about him, is a Julian calendar date. But the Birth date template emits date metadata in the ISO 8601 format. We cannot change that format, it is outside of the control of the Wikimedia Foundation. That standard requires all dates to be in the Gregorian calendar. Jc3s5h (talk) 17:32, 20 May 2022 (UTC)Reply
I do not think that the sorting 'problem' is an issue of this template; the template outputs what it is intended to output. The problem lies in the sorter which isn't smart enough to sort-by-date-and-ignore-extraneous-text (the parenthetical 'aged...' text that is part of the death date) so it reverts to a plain alpha sort. This table appears to sort correctly using data-sort-value="yyyy-mm-dd" where yyyy-mm-dd is the death date:
Judge Date of birth Confirmation date Date of death and age
Francis Hopkinson (1737-09-21)September 21, 1737 September 26, 1789 May 9, 1791(1791-05-09) (aged 53)
Henry Marchant (1741-04-09)April 9, 1741 July 3, 1790 August 30, 1796(1796-08-30) (aged 55)
William Paca (1740-10-31)October 31, 1740 February 10, 1790 October 13, 1799(1799-10-13) (aged 58)
John Sitgreaves 1757 (1757) December 20, 1790 February 13, 1801(1801-02-13) (aged 43–44)
John Stokes (1756-03-20)March 20, 1756 August 3, 1790 October 12, 1790(1790-10-12) (aged 34)
John Sullivan (1740-02-17)February 17, 1740 September 26, 1789 January 23, 1795(1795-01-23) (aged 54)
James Wilson (1742-09-14)September 14, 1742 September 29, 1789 August 21, 1798(1798-08-21) (aged 55)
Trappist the monk (talk) 18:41, 20 May 2022 (UTC)Reply
Would it be possible, without changing anything else, to add a "sort chronologically=y/n" parameter? BD2412 T 18:59, 20 May 2022 (UTC)Reply
This template is implemented by Module:Age which also implements several other templates. The module supports sortable=on and sortable=table for most of the templates. I edited the sandbox module so these also work in {{Death date and age/sandbox}}, and I edited the first table above to use the sandbox template with the new parameter (sortable=table). It appears to be working now. The sort key is a weird number that is compatible with how the module works for other templates. It is based on the Julian day for the death date. That date can be given in full (like May 9, 1791) or it might be "partial" such as 1791 or May 1791. By the way, the module supports entering dates in a single field. For example:
  • {{Death date and age|9 May 1791|21 Sep 1737}} → May 9, 1791(1791-05-09) (aged 53)
  • {{Death date and age/sandbox|9 May 1791|21 Sep 1737|sortable=table}}Error: Need valid death date (first date): year, month, day
Johnuniq (talk) 04:32, 21 May 2022 (UTC)Reply
@Johnuniq: Thanks! Just to be clear, if I use this in a live article, do I need to format it as {{Death date and age/sandbox|1791|05|09|1737|09|21|sortable=table}}, including the /sandbox? BD2412 T 04:47, 21 May 2022 (UTC)Reply
@BD2412: I would normally wait a bit longer but I have now updated the main module so any of the following can be used:
  • {{Death date and age|1791|05|09|1737|09|21|sortable=table}} → data-sort-value="7006237533750000000"|May 9, 1791(1791-05-09) (aged 53)
  • {{Death date and age|1791|5|9|1737|9|21|sortable=table}} → data-sort-value="7006237533750000000"|May 9, 1791(1791-05-09) (aged 53)
  • {{Death date and age|May 9, 1791|Sep 21, 1737|sortable=table}} → data-sort-value="7006237533750000000"|May 9, 1791(1791-05-09) (aged 53)
Johnuniq (talk) 07:15, 21 May 2022 (UTC)Reply

I'd like to summarize the progress by repeating the table in the first post, with Johnuniq's improvement and avoiding the Birth date template for Julian dates. I mixed the Birth date template and the Dts template in the birth date column to see if it would work. It would be on the person writing the table to insure that there weren't any out-of-order dates on account of a Julian date that looks later than a Gregorian date but is actually earlier. It shouldn't be a problem so long as the dates are separated by 14 days or so. It appears to fail when only a birth year; there may be other problems I haven't spotted.

Judge Date of birth Confirmation date Date of death and age
Francis Hopkinson September 21, 1737 September 26, 1789 Error: Need valid death date (first date): year, month, day
Henry Marchant April 9, 1741 July 3, 1790 Error: Need valid death date (first date): year, month, day
William Paca October 31, 1740 February 10, 1790 Error: Need valid death date (first date): year, month, day
John Sitgreaves (1757-Expression error: Unrecognized punctuation character "{".-{{{day}}})Expression error: Unrecognized punctuation character "{"., 1757 December 20, 1790 Error: Need valid death date (first date): year, month, day
John Stokes (1756-03-20)March 20, 1756 August 3, 1790 Error: Need valid death date (first date): year, month, day
John Sullivan February 17, 1740 September 26, 1789 Error: Need valid death date (first date): year, month, day
James Wilson September 14, 1742 September 29, 1789 Error: Need valid death date (first date): year, month, day

Jc3s5h (talk) 11:45, 21 May 2022 (UTC)Reply

For my purposes, I only need "Death date and age" to be sortable, thanks. BD2412 T 21:17, 21 May 2022 (UTC)Reply
The date/age/birth/death templates are still a mixture of designs and implementations. The documentation at Module:Age shows what that module implements. {{Birth date}} does not use Module:Age and therefore does not support sortable=table. I believe {{Birth date}} needs the full date which is why there is that strange error in the table above. Further, {{dts}} uses a different approach which handles geological time (billions of years), where Module:Age only works from 9999 BCE to 9999 CE. The sort key produced by dts is not compatible with that from Module:Age. I think we are going to have to live with the limitations of these designs for some time.

Johnuniq (talk) 02:25, 22 May 2022 (UTC)Reply

Feb 29 edit

What happens if this template is used for someone born on Feb 29 1904 and died on Feb 28 1969? Would that show aged 65, aged 64, or aged 64–65? — Preceding unsigned comment added by KaiHunter12 (talkcontribs) 21:08, 22 June 2022 (UTC)Reply

Your account is provided with a sandbox, which you can use by clicking the word "Sandbox" near the top of the window. You can try it yourself. (I'm supposing that you are using a computer; if you're using a phone, I don't know if the sandbox is readily available.) Jc3s5h (talk) 22:44, 22 June 2022 (UTC)Reply
I'm scared to try it. If it gets aged 65, please change this template. KaiHunter12 (talk) 23:03, 22 June 2022 (UTC)Reply
I tried it, it gives an age of 64. Jc3s5h (talk) 00:42, 23 June 2022 (UTC)Reply
Experiment shows this:
  • {{Death date and age|Feb 28 1969|Feb 28 1904}} → February 28, 1969(1969-02-28) (aged 65)
  • {{Death date and age|Feb 28 1969|Feb 29 1904}} → February 28, 1969(1969-02-28) (aged 64)
  • {{Death date and age|Mar 1 1969|Feb 29 1904}} → March 1, 1969(1969-03-01) (aged 65)
In the second case, the person died one day before completing their 65th year. Johnuniq (talk) 03:04, 23 June 2022 (UTC)Reply
Same goes with Template:ayd. 117 years, 365 days KaiHunter12 (talk) 21:02, 23 June 2022 (UTC)Reply

Burial date edit

A significant fraction of death dates are unknown (prior to 1838 in England at least, when civil registers start) while a burial date may exist from a Parish Register. One cannot add an accurate burial date though one has it, whenever a date of death is called for at which one can clearly not just guess. Wikipedia templates relating to date of death should consider extending with date of burial. JohnHarris (talk) 12:18, 26 September 2023 (UTC)Reply

Uh... you're welcome to add a burial date to a page (as I'm not sure what the current consensus is regarding that information) but we should not be calculating anything based on that. As you say, one cannot know the relationship between when someone dies and when someone is buried, so saying "Born X, Buried Y (age Z)" is inappropriate. Primefac (talk) 13:40, 26 September 2023 (UTC)Reply

I dont know how to change this exactly, so I cant add it in as a request edit

Right now, it gives an error if the birth date comes before the death date. I would recommend to change this so that in this instance, we just resolve it, and take whichever date comes later as the death year. DarmaniLink (talk) 14:30, 9 February 2024 (UTC)Reply

If the error says "you put the dates backwards" then that sounds like the template is functioning properly. Primefac (talk) 15:09, 9 February 2024 (UTC)Reply
If the dates are in the wrong order, the template displays "Error: Death date (first date) must be later in time than the birth date (second date)". In some cases the problem would be due to an editor entering the dates in the wrong order (it is confusing) but it is not a good idea for programs to "fix" problems like that because in other cases the error is due to typos or vandalism. Johnuniq (talk) 05:38, 10 February 2024 (UTC)Reply