Template talk:Death date and age

Template-protected edit request on 5 July 2020
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)
 * Red information icon with gradient background.svg 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)

Sort by year?
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)


 * 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)
 * 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   where   is the death date:
 * 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   where   is the death date:


 * —Trappist the monk (talk) 18:41, 20 May 2022 (UTC)
 * Would it be possible, without changing anything else, to add a "sort chronologically=y/n" parameter? BD2412  T 18:59, 20 May 2022 (UTC)
 * This template is implemented by Module:Age which also implements several other templates. The module supports  and   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 . 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:
 * → 9 May 1791
 * Johnuniq (talk) 04:32, 21 May 2022 (UTC)
 * Thanks! Just to be clear, if I use this in a live article, do I need to format it as, including the /sandbox?  BD2412  T 04:47, 21 May 2022 (UTC)
 * I would normally wait a bit longer but I have now updated the main module so any of the following can be used:
 * → May 9, 1791
 * → May 9, 1791
 * → May 9, 1791
 * Johnuniq (talk) 07:15, 21 May 2022 (UTC)
 * Johnuniq (talk) 07:15, 21 May 2022 (UTC)

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.

Jc3s5h (talk) 11:45, 21 May 2022 (UTC)
 * For my purposes, I only need "Death date and age" to be sortable, thanks. BD2412  T 21:17, 21 May 2022 (UTC)
 * 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 . I believe  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)

Feb 29
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 ? — Preceding unsigned comment added by KaiHunter12  (talk • contribs) 21:08, 22 June 2022 (UTC)
 * 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)
 * I'm scared to try it. If it gets aged 65, please change this template. KaiHunter12 (talk) 23:03, 22 June 2022 (UTC)
 * I tried it, it gives an age of 64. Jc3s5h (talk) 00:42, 23 June 2022 (UTC)
 * Experiment shows this:
 * → Feb 28 1969
 * → Feb 28 1969
 * → Mar 1 1969
 * In the second case, the person died one day before completing their 65th year. Johnuniq (talk) 03:04, 23 June 2022 (UTC)
 * Same goes with Template:ayd. KaiHunter12 (talk) 21:02, 23 June 2022 (UTC)

Burial date
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)
 * 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)

I dont know how to change this exactly, so I cant add it in as a request
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)
 * 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)
 * If the dates are in the wrong order, the template displays "". 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)