Jump to content

Template talk:Death date and age: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Sort by year?: For my purposes, I only need "Death date and age" to be sortable, thanks.
Cewbot (talk | contribs)
m Maintain {{WPBS}}: 2 WikiProject templates. Create {{WPBS}}.
 
(22 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{WikiProject Time|class=Template|importance=High}}
{{WikiProject Microformats}}
{{permprot}}
{{permprot}}
{{User:MiszaBot/config
{{User:MiszaBot/config
|archiveheader = {{talk archive navigation}}
|archiveheader = {{talk archive navigation}}
|maxarchivesize = 75K
|maxarchivesize = 75K
|counter = 2
|counter = 3
|minthreadsleft = 5
|minthreadsleft = 5
|minthreadstoarchive = 1
|minthreadstoarchive = 1
Line 12: Line 10:
}}
}}
{{tfdend|date=2007 February 11|result=keep}}
{{tfdend|date=2007 February 11|result=keep}}
{{WikiProject banner shell|
{{WikiProject Time|importance=High}}
{{WikiProject Microformats}}
}}
{{Archives}}
{{Archives}}

== confusing error message ==

This template seems to accept Feb 29 only for leap years. For example, {{death date and age |2016|02|29|2000|05|05}} works fine. With an invalid death date, there is an error but it points to a problem with the birth date: {{death date and age |2015|02|29|2000|05|05}} (That's how I interpreted the error message - "second date" meant the birth date)

But with the an invalid birth date, there is a different error: {{death date and age |2015|02|28|2001|02|29}}

This was even more confusing because [[:Template:death date]] doesn't seem to care at all, e.g. {{death date|2015|02|29}}, {{death date|2016|02|30}}, {{death date|2016|02|31}}

Is there any way to have the template say specifically which date (death or birth) is in error. I assumed there was a problem with the birth date because of the "second date" part of the error message. I was further misled when I "confirmed" the death date was correct by trying {{death date|1523|02|29}} in [[:template:death date]], where it worked fine. So I went back to looking for a problem with the birth date and finally figured out the problem was really with the death date because there is no Feb 29 in 1523. [[User:MB|<b style="color:#00FF00">MB</b>]] 06:24, 4 January 2019 (UTC)
:This situation arises because the template uses wikitext for most functionality but calls {{tl|age}} to display the age in years. The latter is implemented by [[Module:Age]] and it requires valid dates and issues the unfortunate message. It says the ''second'' date is invalid because that is what it is given:
::Input:&nbsp;&nbsp;&nbsp; <nowiki>{{death date and age |2015|02|29|2000|05|05}}</nowiki>
::Output:&nbsp;&nbsp; 29 February 2015 (<nowiki>{{age |2000|05|05|2015|02|29}}</nowiki>)
:Notice that the dates are reversed in {{tl|age}} and the invalid date is the second.
:The fix would be to implement the logic of this template in [[Module:Age]] but I haven't got around to that. I converted a fair number of other templates to use the module to get proper date validation but it involved a ton of manual fixes to articles with invalid dates. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 06:47, 4 January 2019 (UTC)

:::I will be glad to help with manual fixes to cleanup errors. Just let me know. [[User:MB|<b style="color:#00FF00">MB</b>]] 15:32, 6 January 2019 (UTC)
::::OK, thanks. I put a new version in [[Module:Age/sandbox]] but have run into an irritating glitch regarding what it does if the second date (the birth date) is omitted. I also investigated how the template is used in articles and there aren't many problems (maybe 30 or 40) because this template calls {{tl|age}} and it requires valid dates, so many old problems have been fixed. I think I'll be another few days and will ping you when I update this template to use the module. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 22:15, 6 January 2019 (UTC)

:Perhaps I'm merely repeating what others have already pointed out, but the error message "Error: Death date (first date) must occur after birth date (second date)" is confusing - or even false (because in this template the death date must occur ''before'' the birth date). --[[Special:Contributions/77.173.90.33|77.173.90.33]] ([[User talk:77.173.90.33|talk]]) 09:28, 30 March 2019 (UTC)
::No, that's not correct—the death date (first date) should be after the birth date (the second date) meaning that the first date has to be later than the first. On 7 January 2019 I updated [[Module:Age]] to implement this template, and updated [[Template:Death date and age]] to use the module. That means the messages above are obsolete (they refer to what the old template did before 7 January 2019). It looks like I forgot to ping [[User:MB|MB]] so here is a late notification. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 10:36, 30 March 2019 (UTC)
:::Editors enter ''two'' dates when using this template. One of these comes first, the one on the left. The death date may be ''chronologically'' last, but it's included first. Neither the error message nor what you write makes any sense, and both are completely confusing. --[[Special:Contributions/77.173.90.33|77.173.90.33]] ([[User talk:77.173.90.33|talk]]) 10:40, 30 March 2019 (UTC)
:::And, by the way, I'm talking about this error message: {{Death date and age|1913|06|10|2008|10|14}} <blockquote>Error: Death date (first date) must occur after birth date (second date)</blockquote> --[[Special:Contributions/77.173.90.33|77.173.90.33]] ([[User talk:77.173.90.33|talk]]) 10:43, 30 March 2019 (UTC)
:::I think the confusion is caused by "occur" being multi-interpretable. Occur (exist) in the template vs. occur (take place) chronologically. --[[Special:Contributions/77.173.90.33|77.173.90.33]] ([[User talk:77.173.90.33|talk]]) 10:53, 30 March 2019 (UTC)
::::Yes, that is unfortunate. What should it say? [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 10:57, 30 March 2019 (UTC)
:::::I know we'll get into the nitty-gritty of "template-speak" vs "captain dummy talk", but we could change it to say {{tq|Death date (first date values) must occur after birth date (second date values)}} or something similar, to make it clear that it's the parameter set we're referring to (simply saying "first parameter" might be confusing since technically the dates are three params. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 12:11, 30 March 2019 (UTC)
::::::Phrase "must occur after" there can still cause confusion. I actually wanted to reply to you with "before :)" thinking you made a mistake. But then I realized you're simply using occur chronologically. So, your suggested phrasing doesn't solve the problem (fully). --[[Special:Contributions/77.173.90.33|77.173.90.33]] ([[User talk:77.173.90.33|talk]]) 14:32, 30 March 2019 (UTC)
:::::::{{tq|Death date (first date value) must be later in time than the birth date (second date value)}}? Without semantically deconstructing every nuance of every word we use, I'm not sure if we're making things better or worse by being this specific. At some point we have to assume that the users will have ''some'' idea of what we're talking about. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 21:35, 30 March 2019 (UTC) {{small|And I apologize if I sound snarky or sarcastic, I'm genuinely curious how we can be succinct and avoid being overly verbose.}}
::::::::What you suggest here - {{tq|Death date (first date value) must be later in time than the birth date (second date value)}} - seems perfect to me. --[[Special:Contributions/77.173.90.33|77.173.90.33]] ([[User talk:77.173.90.33|talk]]) 22:28, 30 March 2019 (UTC)
I updated [[Module:Age]] with a new message namely "{{red|Death date (first date) must be later in time than the birth date (second date)}}". That's slightly different from Primefac's suggestion but should be adequate and is consistent with other messages. I did some [[i18n]] work for the Bengali Wikipedia in February and took this opportunity to put that in the enwiki module so it's a massive change. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 01:11, 31 March 2019 (UTC)
:Thanks Johnuniq. --[[Special:Contributions/77.173.90.33|77.173.90.33]] ([[User talk:77.173.90.33|talk]]) 09:48, 31 March 2019 (UTC)

== Using Module:Age ==

I plan to use [[Module:Age]] to implement this template soon. {{tl|Death date and age/sandbox}} uses the module and can be used for testing. The module checks dates are valid and has more features.

The current template documentation says the "year, month, and day of death are required" but that is not the case. For example, [[William Inge (judge)]] has
*<code><nowiki>{{Death date and age|1322|5||1260||}}</nowiki></code> → {{Death date and age|1322|5||1260||}}
*<code><nowiki>{{Death date and age/sandbox|1322|5||1260||}}</nowiki></code> → {{Death date and age/sandbox|1322|5||1260||}}
The template requires the month of death but that seems to be a limitation due to wikitext complexity rather than a wanted requirement. The module requires the year of death and the year of birth. All other fields are optional.

The module also accepts two dates in a variety of formats:
*<code><nowiki>{{Death date and age/sandbox|2011|5|12|2000|4|11}}</nowiki></code> → {{Death date and age/sandbox|2011|5|12|2000|4|11}}
*<code><nowiki>{{Death date and age/sandbox|2011-05-12|2000-4-11}}</nowiki></code> → {{Death date and age/sandbox|2011-05-12|2000-4-11}}
*<code><nowiki>{{Death date and age/sandbox|12 May 2011|April 11, 2000}}</nowiki></code> → {{Death date and age/sandbox|12 May 2011|April 11, 2000}}

The main reason to use the module is to improve the error messages that can occur (see [[#confusing error message]] above). Examples of error messages:
*<code><nowiki>{{death date and age/sandbox|2005|4|12|2000|4|31}}</nowiki></code> → {{death date and age/sandbox|2005|4|12|2000|4|31}}
*<code><nowiki>{{death date and age/sandbox|2005|4|31|2000|4|30}}</nowiki></code> → {{death date and age/sandbox|2005|4|31|2000|4|30}}
*<code><nowiki>{{death date and age/sandbox|2000|4|1|2000|4|2}}</nowiki></code> → {{death date and age/sandbox|2000|4|1|2000|4|2}}
Earlier I thought that using the module would reveal 30 or 40 problems in articles that would need to be fixed. After looking more closely, I don't think that is the case because the existing template mostly calls {{tl|age}} which uses the module, so dates are already validated. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 09:30, 7 January 2019 (UTC)

:Once you've updated this template. Just wondering if it's also worth doing [[Template:Birth date and age2]] as well? -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 11:41, 7 January 2019 (UTC)

::Will the updates either issue a warning, or not produce metadata, if either date is before 15 October 1582? [[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 12:08, 7 January 2019 (UTC)
:::Compatibility was my first thought, so no. Putting the two templates for William Inge above into [[Special:ExpandTemplates]] shows they generate exactly the same output, except the module does not have the extraneous comma after "May". That cutoff date is unclear because, as you would know, the switchover date varied enormously worldwide. However, it would be pretty easy to add a test to not output the metadata. I was also wondering about whether the metadata should show zeroes for missing month/day (it currently does), or whether an unknown component should mean the metadata is omitted. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 22:33, 7 January 2019 (UTC)
::::I switched the template to use the module. Problems will appear in [[:Category:Age error]] which I check regularly. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 22:55, 7 January 2019 (UTC)
:::::I understand the module is supposed to emit metadata that follows the V-card standard. [https://tools.ietf.org/html/rfc6350#section-4.3 That standard] says it follows a subset of ISO 8601:2004. I have a copy of that that I grabbed before ISO removed all the publicly accessible versions. The relevant section indicate that if the date is unknown, it may be omitted. Similarly, if the month and date are both unknown, they can both be omitted. Substituting zeros for unknown values is not mentioned, and is therefore incorrect. The examples given in the standard are 1985-04 for April 1985, and just 1985 when neither the month nor date are known. [[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 03:32, 8 January 2019 (UTC)
::::::Would you mind posting a new section with a proposal for what should happen with the metadata. According to the doc, the metadata is not official anyway because (it says) there is no standard for death date metadata. Therefore I'm not sure if it matters what we do, but I have no concern about removing it if wanted. The year is always known (omitting the year gives an error). Apart from possibly omitting metadata when the month or day is unknown, there is the question of what to do when the death date is before the official Gregorian calendar. We need some discussion from people with an interest in metadata. Any sign of consensus would mean I'd be happy to do what is needed with the module. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 05:00, 8 January 2019 (UTC)
:::::::Do you know if all the date and biography related templates all use Module:Age? Would fixing Module:Age fix all of them? It seems a shame to fix it for just the death date and age template when all of them are an issue. [[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 15:51, 8 January 2019 (UTC)
{{od|7}}There are lots of related templates and many do not use the module. I listed some at [[Module talk:Age#Age/birth/death templates]]. Some of those output metadata. I looked at {{tl|birth-date and age}} and it outputs a lot of HTML that is quite different from {{tl|birth date and age}}:
<pre>
{{birth-date and age|April 12, 1941}}
<span class="mw-formatted-date" title="1941-04-12">April 12, 1941</span><span style="display:none">&amp;#160;(<span class="dtstart bday">1941-04-12</span>)</span> (age&amp;nbsp;<span class="currentage"></span>77)

{{birth date and age|April 12, 1941}}
<span style="display:none"> (<span class="bday">1941-04-12</span>) </span>April 12, 1941<span class="noprint ForceAgeToShow"> (age&amp;nbsp;77)</span>

{{death-date and age|May 1993|May 1941}}
May 1993<span style="display:none">&amp;#160;(<span class="dtend dday deathdate">1993-06</span>)</span> (aged&amp;nbsp;52)

{{death date and age|May 1993|May 1941}}
May 1993<span style="display:none">(1993-05-00)</span> (aged&amp;nbsp;51–52)
</pre>
There would be a fair bit of turmoil in getting all the templates cleaned up, and there are several that I did not list that probably should be deleted. Proceed slowly, I guess. I will ping [[User:MB|MB]] to be sure they know the message problems mentioned above have been fixed. There were only a couple of glitches in articles and they have been fixed. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 06:35, 9 January 2019 (UTC)
:I added outputs from {{tl|death-date and age}} and {{tl|death date and age}} as well. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 08:42, 9 January 2019 (UTC)
:I put more details at [[Module talk:Age#Age/birth/death templates]] and asked about the metadata at [[WT:WikiProject Microformats#Age/birth/death microformats]]. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 09:32, 12 January 2019 (UTC)

== "Age" versus "aged": 2019 ==

Read all of this: https://en.wikipedia.org/wiki/Template_talk:Death_date_and_age/Archive_2#%22Age%22_versus_%22aged%22 - no consensus was reached.

Can we reach a consensus now?

* '''Yes''' (if en-US is specified use "age", else use "aged") - I have lived in the US all my life, and I know one other person who (I'm fairly sure) has also lived in the US for all of their life and thinks that "aged" in this context is wrong. The word "aged" in this context is ''not'' American English, but it is British English. --[[User:User123o987name|User123o987name]] ([[User talk:User123o987name|talk]]) 07:36, 11 May 2019 (UTC)
*:This page won't get general views. I suggest asking at [[WT:Manual of Style/Dates and numbers]]. The link to the 2015 discussion is [[Template talk:Death date and age/Archive 2#"Age" versus "aged"]]. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 07:54, 11 May 2019 (UTC)
*::Agreed. There are 42 page watchers here with maybe a third checking it regularly. Getting a change made to a template used on 200k+ pages will require a little more input. If you do decide to start a discussion, though, please make sure there's a link here so that people like me who ''only'' watch this template (and not MOS pages) will know. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 11:57, 11 May 2019 (UTC)


== Template-protected edit request on 5 July 2020 ==
== Template-protected edit request on 5 July 2020 ==
Line 199: Line 114:
[[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 11:45, 21 May 2022 (UTC)
[[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 11:45, 21 May 2022 (UTC)
: For my purposes, I only need "Death date and age" to be sortable, thanks. [[User:BD2412|<span style="background:gold">'''''BD2412'''''</span>]] [[User talk:BD2412|'''T''']] 21:17, 21 May 2022 (UTC)
: For my purposes, I only need "Death date and age" to be sortable, thanks. [[User:BD2412|<span style="background:gold">'''''BD2412'''''</span>]] [[User talk: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. {{tl|Birth date}} does not use Module:Age and therefore does not support <code>sortable=table</code>. I believe {{tlf|Birth date}} needs the full date which is why there is that strange error in the table above. Further, {{tl|dts}} uses a different approach which handles geological time (billions of years), where Module:Age only works from 9999&nbsp;BCE to 9999&nbsp;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.
[[User:Johnuniq|Johnuniq]] ([[User talk: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 {{ay|1904|1969}}? <!-- Template:Unsigned --><span class="autosigned" style="font-size:85%;">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User: KaiHunter12 | KaiHunter12 ]] ([[User talk: KaiHunter12 #top|talk]] • [[Special:Contributions/ KaiHunter12 |contribs]]) 21:08, 22 June 2022 (UTC)</span>
: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.) [[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 22:44, 22 June 2022 (UTC)
::I'm scared to try it. If it gets aged 65, please change this template. [[User:KaiHunter12|KaiHunter12]] ([[User talk:KaiHunter12|talk]]) 23:03, 22 June 2022 (UTC)
:::I tried it, it gives an age of 64. [[User:Jc3s5h|Jc3s5h]] ([[User talk:Jc3s5h|talk]]) 00:42, 23 June 2022 (UTC)
:Experiment shows this:
:*<code><nowiki>{{Death date and age|Feb 28 1969|Feb 28 1904}}</nowiki></code> → {{Death date and age|Feb 28 1969|Feb 28 1904}}
:*<code><nowiki>{{Death date and age|Feb 28 1969|Feb 29 1904}}</nowiki></code> → {{Death date and age|Feb 28 1969|Feb 29 1904}}
:*<code><nowiki>{{Death date and age|Mar 1 1969|Feb 29 1904}}</nowiki></code> → {{Death date and age|Mar 1 1969|Feb 29 1904}}
:In the second case, the person died one day before completing their 65th year. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 03:04, 23 June 2022 (UTC)
::Same goes with [[Template:ayd]]. {{ayd|1904|2|29|2022|2|28}} [[User:KaiHunter12|KaiHunter12]] ([[User talk: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. [[User:Cb6|JohnHarris]] ([[User talk:Cb6|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. [[User:Primefac|Primefac]] ([[User talk: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. [[User:DarmaniLink|DarmaniLink]] ([[User talk: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. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 15:09, 9 February 2024 (UTC)
:If the dates are in the wrong order, the template displays "{{red|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. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 05:38, 10 February 2024 (UTC)

Latest revision as of 05:11, 18 June 2024

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 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)
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}} → data-sort-value="7006237533750000000"|May 9, 1791(1791-05-09) (aged 53)
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 May 9, 1791(1791-05-09) (aged 53)
Henry Marchant April 9, 1741 July 3, 1790 August 30, 1796(1796-08-30) (aged 55)
William Paca October 31, 1740 February 10, 1790 October 13, 1799(1799-10-13) (aged 58)
John Sitgreaves (1757-Expression error: Unrecognized punctuation character "{".-{{{day}}})Expression error: Unrecognized punctuation character "{"., 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 February 17, 1740 September 26, 1789 January 23, 1795(1795-01-23) (aged 54)
James Wilson September 14, 1742 September 29, 1789 August 21, 1798(1798-08-21) (aged 55)

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]