Module talk:Age
Module:Age
I created Module:Age to fix some problems reported with {{Age in years and months}}, and that template has been replaced with code to invoke this module. I don't know if it would be worth replacing other related templates with a call to a module, but as an experiment I have added code to this module to implement {{Age in days}} and {{Gregorian serial date}}. I have done over 100 tests offline which suggest that the module is performing correctly. The following shows a few results that compare the outputs from the current templates with User:Johnuniq/age days and User:Johnuniq/gsd which invoke the module.
Parameters to template | Result from {{age in days}} |
Result from {{User:Johnuniq/age days}}
|
---|---|---|
|1898|1|1|1900|1|1 |
730 | 730 |
|1900|1|1|1898|1|1 |
−730 | −730 |
|2013|4|1 |
4538 | 4538 |
Parameters to template | Result from {{gsd}} |
Result from {{User:Johnuniq/gsd}}
|
---|---|---|
|year=1|month=1|day=1 |
1 | 1 |
|year=2000|month=12|day=31 |
730485 | 730485 |
(none) |
739497 | 739497 |
I'll mention this in a couple of places to let people know the module is available. Johnuniq (talk) 09:55, 2 April 2013 (UTC)
- Seems to be working well! Will it also work in e.g. {{Birth date and age}}? It Is Me Here t / c 14:55, 11 June 2013 (UTC)
- I'm super busy and can't take on any extra thinking for a while, however the short answer is that the module could fairly easily be extended to handle what I think the birth date and age template is doing, but it would need a bit of work and testing. Is there a known problem with the template? If so, that would focus my attention and make it more likely that people would want to accept a new solution to the very widely used dob template. It's a bit lucky that I noticed this. If you post here and I don't reply in a day or two, please ping my talk. Johnuniq (talk) 03:42, 12 June 2013 (UTC)
- No problems as such that I know of; it's just that I thought that templates using Modules rather than template code loaded faster (esp. on mobile devices)? There's no rush; I just thought that if the bulk of the work has already been done, and that it would be a relatively easy matter to employ this code in other areas, it would seem a shame not to if it improves reader experience. It Is Me Here t / c 10:54, 13 June 2013 (UTC)
- I'm super busy and can't take on any extra thinking for a while, however the short answer is that the module could fairly easily be extended to handle what I think the birth date and age template is doing, but it would need a bit of work and testing. Is there a known problem with the template? If so, that would focus my attention and make it more likely that people would want to accept a new solution to the very widely used dob template. It's a bit lucky that I noticed this. If you post here and I don't reply in a day or two, please ping my talk. Johnuniq (talk) 03:42, 12 June 2013 (UTC)
Recent change
I just reverted the change to the module as it broke the module, adding over a hundred articles to Category:Pages with script errors. One change that broke things was the removal of age_ym but there was possibly others, I did not even try checking all the articles with errors but looked for the recent change that caused it.--JohnBlackburnewordsdeeds 12:24, 24 June 2016 (UTC)
- @JohnBlackburne: Thanks! Unfortunately there was a lot of off-wiki chaos here yesterday and I completely forgot to update {{age in years and months}} for the way the new module works. I did check a few things before I was called away, but the pages hadn't updated so I didn't see any problems. I have restored the new version and updated the template, and will be monitoring the situation. Johnuniq (talk) 01:01, 25 June 2016 (UTC)
Allow julianday month offsets to permit use in JULIANDAY
{{Edit template-protected}} closed by author
{{JULIANDAY}} is the only template listed in the docs that doesn't use this module, and I believe it's because of edge cases involving leap years and too-large day-of-months in general, which the Age module rejects but the JULIANDAY template accepts. "1900-02-29" doesn't make sense in most other contexts, but it has a well-defined Julian day and is expected to work in the current {{JULIANDAY}} template (see testcases).
The edit I'm requesting fixes this compatibility issue by using an offset, and if it is accepted we should be able to finally replace {{JULIANDAY}} with this module so that all implemented template functionalities in the docs are actually used in their corresponding templates.
This edit only affects the dateToJd
function, so it will not affect any non-Julian-day usage of the module. It's fully implemented in the module sandbox and it's been tested with all the {{JULIANDAY}} testcases. Here's the revised function:
local function dateToJd(frame) -- Return Julian date (a number) from a date which may include a time, -- or the current date ('currentdate') or current date and time ('currentdatetime'). -- The word 'Julian' is accepted for the Julian calendar. local Date = getExports(frame) local args = frame:getParent().args local date if args[1] and args[2] then date = Date(args[1], args[2], 1, args[4], args[5], args[6], args[7]) elseif args[1] then date = Date(args[1], 1, 1, args[4], args[5], args[6], args[7]) else date = Date(args[1], args[2], args[3], args[4], args[5], args[6], args[7]) end local offset = 0 if args[3] then offset = tonumber(args[3]) - 1 end if date then return tostring(date.jd + offset) end return message('Need valid year/month/day or "currentdate"') end
I can of course make any other changes if they help. Thanks, Habst (talk) 05:12, 17 June 2018 (UTC)
- Please let's take some time to discuss this before moving to change the module. The only reason I haven't yet updated {{JULIANDAY}} to use the module is that I got distracted by other things. I updated the templates very slowly because the tracking categories can take a long time to catch up and show any problems, and I'm conservative about changing code. It also took quite a lot of work to fix old errors (invalid dates) in articles that the module reported.
Thorough tests show that the module gives correct Julian days for all dates from 9999 BCE to 9999 CE (I wrote a test harness to check the first and last days of the month for all years in that range). The current template uses arithmetic that fails for dates well inside that range. For example,
{{JULIANDAY|-4800|3|1}}
(using the old template) gives -32410 whereas the module gives -32044. A reasonable argument could be made that it is silly to expect a Julian day for such an extreme date, but that's how it is. I will need 24 hours to think about the above. Meanwhile, the major advantage of the module IMHO is that it displays an error if an invalid date is used. Why would anyone want to know the Julian day of 1900-02-29 or 2018-04-31 (both of which are invalid dates)? Johnuniq (talk) 05:49, 17 June 2018 (UTC) - By the way, the module supports
fix=on
which allow invalid dates to be entered. The date is adjusted by overflowing the day/month values. For example, using {{extract}}:{{JULIANDAY|1900|02|28}}
→ 2415079{{extract|1900-02-28|show=juliandate}}
→ 2415079{{extract|1900-02-29|fix=on|show=juliandate}}
→ 2415080
- If
fix=on
were omitted, the last of the above would show an error. If there was a reason for needing it, that parameter could be made available in {{JULIANDAY}}. Johnuniq (talk) 05:57, 17 June 2018 (UTC)- Hi Johnuniq, thanks for your points here and I agree we should discuss it. I have no problem using the current
dateToJd
function in {{JULIANDAY}} if that is acceptable -- the only reason why I modified the function to accept invalid dates were because invalid dates were being used in the test cases (which I didn't write) so I wanted to make them pass. - I agree that the Lua module is more accurate for larger magnitude dates, and I think that's a good reason to begin to use the module in the template (surely nobody would have depended on that incorrect behavior with the template arithmetic). Maybe using
fix=on
is better than my offset change -- if it is, then we should use that instead. Or if nobody cares about knowing the date of 1900-02-29, then maybe we shouldn't use it at all. What do you think? --Habst (talk) 19:57, 17 June 2018 (UTC)- I would far prefer to have the template require valid dates and fix problems found where invalid dates are used. That is much better in the long run than accepting junk. I revert a dozen vandal attacks on articles each week when the bad edit damages a date in a template monitored by this module's error tracking category. Do you know of any reason to accept invalid or partial dates for JULIANDAY other than some test examples? I'll look at some examples of JULIANDAY in articles later. Johnuniq (talk) 23:31, 17 June 2018 (UTC)
- I don't know of any examples; I only did it because of the testcases. If it's not used in practice and not documented, then there would be no harm in making the switch to the module either way. Do you think I should cancel this ER and make one at the {{JULIANDAY}} template to just use the unmodified module then? --Habst (talk) 23:43, 17 June 2018 (UTC)
- I'll update JULIANDAY soon but I need to check my notes on the usage of that template first to gauge how many problems might occur. Johnuniq (talk) 01:21, 18 June 2018 (UTC)
- I updated {{JULIANDAY}} to use Module:Age. It turns out the template was used in only half a dozen articles, but is used in about 20 templates which are used in around 12,000 articles. It is too hard to determine whether those templates can generate an invalid date, but a few cases that I checked only had valid dates. I will monitor Category:Age error to see if errors are reported. Johnuniq (talk) 03:56, 18 June 2018 (UTC)
- OK, thank you! I'm marking this as resolved now. --Habst (talk) 05:20, 18 June 2018 (UTC)
- I had to revert my edit so JULIANDAY is again using the old template code. Using the module there were hundreds of articles in Category:ParserFunction errors due to a handful of templates that I will investigate later: {{update after}} + {{show by date}} + {{PD-Australia}} and possibly others. That will be due to errors reported by the module with invalid dates but I'll check what's going on and do something in a day or two. Johnuniq (talk) 06:09, 18 June 2018 (UTC)
- OK, thank you! I'm marking this as resolved now. --Habst (talk) 05:20, 18 June 2018 (UTC)
- I updated {{JULIANDAY}} to use Module:Age. It turns out the template was used in only half a dozen articles, but is used in about 20 templates which are used in around 12,000 articles. It is too hard to determine whether those templates can generate an invalid date, but a few cases that I checked only had valid dates. I will monitor Category:Age error to see if errors are reported. Johnuniq (talk) 03:56, 18 June 2018 (UTC)
- I'll update JULIANDAY soon but I need to check my notes on the usage of that template first to gauge how many problems might occur. Johnuniq (talk) 01:21, 18 June 2018 (UTC)
- I don't know of any examples; I only did it because of the testcases. If it's not used in practice and not documented, then there would be no harm in making the switch to the module either way. Do you think I should cancel this ER and make one at the {{JULIANDAY}} template to just use the unmodified module then? --Habst (talk) 23:43, 17 June 2018 (UTC)
- I would far prefer to have the template require valid dates and fix problems found where invalid dates are used. That is much better in the long run than accepting junk. I revert a dozen vandal attacks on articles each week when the bad edit damages a date in a template monitored by this module's error tracking category. Do you know of any reason to accept invalid or partial dates for JULIANDAY other than some test examples? I'll look at some examples of JULIANDAY in articles later. Johnuniq (talk) 23:31, 17 June 2018 (UTC)
- Hi Johnuniq, thanks for your points here and I agree we should discuss it. I have no problem using the current
The problem is that templates like {{update after}} can pass expressions in a parameter, such as 18+0
for the day. That works with the old template because everything is wrapped in a #expr and so is evaluated. The module would have to use mw.ext.ParserFunctions.expr
on each parameter if it's not a number. Problem: the module supports single-parameter dates, for example, these are the same (there is no comma for the first case since some templates expect a value without commas when used like this):
{{age in days|2001|5|23|2011|6|1}}
→ 3661{{age in days|May 23, 2001|1 June 2011}}
→ 3,661
I'll need a while to think about whether that can be supported for JULIANDAY while evaluating non-numbers as an expression. Johnuniq (talk) 09:52, 18 June 2018 (UTC)
Hmm, I tried something and will think about it later:
{{JULIANDAY|2012|4|30}}
→ 2456048{{JULIANDAY/sandbox|April 30, 2012}}
→ 2456048{{JULIANDAY/sandbox|2012|4|30}}
→ 2456048{{JULIANDAY/sandbox| 2000 + 12 |12-9+1|3*10+0}}
→ Error: Need valid year|month|day or "currentdate"
Johnuniq (talk) 10:15, 18 June 2018 (UTC)
- {{Show by}} mentions relative (e.g. +20 hours) times. The module can add/subtract date/time units but matching the syntax supported by #expr would be tricky. I'm starting to think there is no point in having the module implement JULIANDAY, apart from the fact that the module gives accurate results for weird dates that are unlikely to be used. Johnuniq (talk) 04:10, 20 June 2018 (UTC)
- Thanks for your research on this Johnuniq. Why not have the template be a wrapper around the module that just
#expr
s all its arguments first before passing them to the age module? --Habst (talk) 07:01, 20 June 2018 (UTC)- The templates supported by the module allow entry of a date in various formats, for example
|2012|4|30
or|2012-4-30
or30 Apr 2012
orApril 30, 2012
. The time can also be included in each of these formats. The last example at 10:15, 18 June 2018 just above shows that the sandbox handles simple expressions—it tests each parameter to avoid trying to evaluate something like|2012-4-30
. A problem is that it is not clear how JULIANDAY is being used—I haven't seen any examples of "+20 hours" in the docs mentioned just above, so I'm not sure what needs to be supported. One approach would be to switch the template to use the module again and see what breaks to determine what fixes would be needed in addition to what the sandbox does now. Johnuniq (talk) 07:21, 20 June 2018 (UTC)
- The templates supported by the module allow entry of a date in various formats, for example
- Thanks for your research on this Johnuniq. Why not have the template be a wrapper around the module that just
Age/birth/death templates
The following templates are not implemented by Module:Age. They do not emit metadata.
Template | Usage |
---|---|
{{age as of date}} | articles |
{{birth based on age as of date}} | articles |
{{birth date based on age at death}} | articles |
{{birth year and age}} | articles |
{{birthDeathAge}} | articles |
{{death year and age}} | articles |
{{years ago}} | articles |
{{years or months ago}} | articles |
{{birth year from age at date}} | redirect to {{birth based on age as of date}} |
{{age in days ymd}} | unused |
{{age in years, months, weeks, days and hours}} | unused |
{{age ymd}} | unused |
{{age in fortnights}} | used in a userbox |
{{age2}} | used in two articles; partial dates |
{{age in decimal years}} | used in one article |
{{age in sols}} | used in some Mars articles |
The following templates are used in articles and emit metadata.
Template | In Module:Age |
---|---|
{{birth date and age}} | yes |
{{birth date and age2}} | – |
{{birth date}} | – |
{{birth-date and age}} | – |
{{birth-date}} | – |
{{death date and age}} | yes |
{{death date and given age}} | – |
{{death date}} | – |
{{death-date}} | redirect to {{end-date}} |
{{death-date and age}} | – |
{{end-date}} | – |
Examples showing the metadata emitted by the above templates.
#1 {{birth date|2000|2|10}} <span style="display:none">(<span class="bday">2000-02-10</span>)</span>February 10, 2000 #2 {{birth date and age|2000|2|10}} <span style="display:none"> (<span class="bday">2000-02-10</span>) </span>February 10, 2000<span class="noprint ForceAgeToShow"> (age 16)</span> #3 {{birth date and age2|2012|2|23|2000|2|10}} <span style="display:none"> (<span class="bday">2000-02-10</span>)</span>February 10, 2000 (aged 12) #4 {{birth-date|10 February 2000}} <span class="mw-formatted-date" title="2000-02-10">10 February 2000</span><span style="display:none"> (<span class="dtstart bday">2000-02-10</span>)</span> #5 {{birth-date|February 2000}} February 2000<span style="display:none"> (<span class="dtstart bday">2000-02</span>)</span> #6 {{birth-date|2000}} 2000<span style="display:none"> (<span class="dtstart bday">2000</span>)</span> #7 {{birth-date and age|2000}} 2000<span style="display:none"> (<span class="dtstart bday">2000</span>)</span> (age <span class="currentage"></span>19) #8 {{birth-date and age|2000|2}} 2<span style="display:none"> (<span class="dtstart bday">2000</span>)</span> (age <span class="currentage"></span>19) #9 {{death date|2012|2|23}} <span style="display:none">(<span class="dday deathdate">2012-02-23</span>)</span>February 23, 2012 #10 {{death date and given age|2012|2|23|45}} <time class="dday deathdate" datetime="2012-02-23">February 23, 2012</time> (aged 45) #11 {{death-date|23 February 2012}} <span class="mw-formatted-date" title="2012-02-23">23 February 2012</span><span style="display:none"> (<span class="dtend ">2012-02-24</span>)</span> #12 {{death-date|February 2012}} February 2012<span style="display:none"> (<span class="dtend ">2012-03</span>)</span> #13 {{death-date|2012}} 2012<span style="display:none"> (<span class="dtend ">2013</span>)</span> #14 {{death-date and age|23 Feb 2012|10 Feb 2000}} <span class="mw-formatted-date" title="2012-02-23">23 Feb 2012</span><span style="display:none"> (<span class="dtend dday deathdate">2012-02-24</span>)</span> (aged 12) #15 {{death-date and age|Feb 2012|Feb 2000}} Feb 2012<span style="display:none"> (<span class="dtend dday deathdate">2012-03</span>)</span> (aged 12) #16 {{death-date and age|2012|2000}} 2012<span style="display:none"> (<span class="dtend dday deathdate">2013</span>)</span> (aged 12) #17 {{death date and age|2012|2|23|2000|2|10}} February 23, 2012<span style="display:none">(2012-02-23)</span> (aged 12) #18 {{death date and age|2012|2|23|2000|2}} February 23, 2012<span style="display:none">(2012-02-23)</span> (aged 11–12) #19 {{death date and age|2012|2|23|2000}} February 23, 2012<span style="display:none">(2012-02-23)</span> (aged 11–12)
Johnuniq (talk) 09:11, 12 January 2019 (UTC)
- I asked at WT:WikiProject Microformats#Age/birth/death microformats which of the above need to be fixed. Johnuniq (talk) 09:29, 12 January 2019 (UTC)
- Some of those end date templates are outputting a year/month/day after the date entered as a parameter in the metadata. That's because they want the end date to be at the end or after the actual end date (including a time component), so just wondering if it would be better to not include the metadata at all if only the year or month is specified rather than adding on a year or month to the parameter value, and if a full date is specified, rather than adding a day onto that, include the time component in the metadata of 23:59:59 ? -- WOSlinker (talk) 12:10, 12 January 2019 (UTC)
- I numbered each template to help identify them. I was wondering why, for example, #12 (February 2012) has metadata 2012-03. You are pointing out that the intention is for the metadata to identify a point in time that is guaranteed to be "the end". If someone died at 23:59 2012-02-29 then 2012-03 would be correct. A standard or local style guide would be nice. I don't really like the bloat in some of the above metadata and would be happier if it was documented as "should" somewhere. Johnuniq (talk) 02:41, 13 January 2019 (UTC)
- I would recommend using the
time
element, if MediaWiki allows that in templates. That's preferable to usingdisplay:none
to hide metadata. For example, #12 I would author as:<time class="dtend" datetime="2012-02">February 2012</time>
While we're at it, I would recommend adding microformats2 class names, so it would become:<time class="dt-end dtend" datetime="2012-02">February 2012</time>
I'll review this list of output and comment with other updates. – gRegor (talk • contribs) 01:14, 29 March 2019 (UTC)
- Some of those end date templates are outputting a year/month/day after the date entered as a parameter in the metadata. That's because they want the end date to be at the end or after the actual end date (including a time component), so just wondering if it would be better to not include the metadata at all if only the year or month is specified rather than adding on a year or month to the parameter value, and if a full date is specified, rather than adding a day onto that, include the time component in the metadata of 23:59:59 ? -- WOSlinker (talk) 12:10, 12 January 2019 (UTC)
Death dates in the future
I suggest adding Category:Age error for death dates more than one day in the future. Allow one day or 15 hours to account for time zones. Example error (now fixed). PrimeHunter (talk) 20:51, 5 April 2019 (UTC)
- OK, I put that in the sandbox. The following shows what the sandbox produces for someone born on 1 Jan 2000 and who died yesterday, today, tomorrow, the day after tomorrow, and one month in the future.
{{Death date and age/sandbox|{{extract|currentdate|add=-1d}}|1 Jan 2000}}
→ September 2, 2025 (aged 25){{Death date and age/sandbox|{{extract|currentdate}} |1 Jan 2000}}
→ September 3, 2025 (aged 25){{Death date and age/sandbox|{{extract|currentdate|add=1d}} |1 Jan 2000}}
→ September 4, 2025 (aged 25){{Death date and age/sandbox|{{extract|currentdate|add=2d}} |1 Jan 2000}}
→ Error: Death date (first date) must not be in the future{{Death date and age/sandbox|{{extract|currentdate|add=1m}} |1 Jan 2000}}
→ Error: Death date (first date) must not be in the future
What about {{Birth date and age}}? Perhaps birth dates in the future by more than one day should also raise an error? Some articles concern stories unrelated to real people and they could have future birth dates. I suppose showing an error (and the error category) would determine if that was a problem.Johnuniq (talk) 06:07, 6 April 2019 (UTC)- Oops, birth date and age already rejects birth dates in the future so this is probably ready for release. Johnuniq (talk) 09:56, 7 April 2019 (UTC)
- Done, I updated Module:Age. Johnuniq (talk) 23:47, 7 April 2019 (UTC)
- Oops, birth date and age already rejects birth dates in the future so this is probably ready for release. Johnuniq (talk) 09:56, 7 April 2019 (UTC)
Sorting will use data-sort-value
I changed Module:Age/sandbox with a minor enhancement for the |prefix=text
option and a change to how hidden sort keys work. Once this change is live, all templates implemented by this module (see list at Module:Age) will use data-sort-value for sort keys. This follows from a discussion regarding {{convert}} and {{val}} which will change in a similar manner.
The following shows some templates and the output from Special:ExpandTemplates.
{{age in days/sandbox|1800-1-1|1800-9-1|prefix=over|sortable=table}} data-sort-value="7002243000000000000"|over 243 {{age in days nts/sandbox|1800-1-1|1800-9-1|prefix=over}} <span data-sort-value="7002243000000000000♠"></span>over 243 {{age in months/sandbox|1800-1-1|1800-9-1|prefix=over|sortable=on}} <span data-sort-value="7002243000000000000♠"></span>over 8 {{time interval/sandbox|1800-1-1|1800-9-1|prefix=over|sortable=on}} <span data-sort-value="7002243000000000000♠"></span>over 8 months {{extract/sandbox|1900-9-1|prefix=before|sortable=on}} <span data-sort-value="7006241526350000000♠"></span>before 1 September 1900
@TheDJ: Is the above ok? Johnuniq (talk) 07:41, 23 April 2019 (UTC)
Sorting in tables
A few years ago I saw that Template:age in years and days was being changed to remove the hidden sort key, and the template:ayd or template:age in years and days nts should be used in sortable tables. However, today while editing List of longest-living state leaders, I noticed that when sorting by age, the living leaders all bunched together. When I switched the template to template:age in years and days, this fixed even though if I understand the templates correctly that shouldn't have worked. Has something changed on the back-end or have I misunderstood the template? Emk9 (talk) 01:55, 27 April 2019 (UTC)
- The following from Special:ExpandTemplates shows exactly what the templates output today:
{{ayd|1918|5|27}} <span style="display:none" class="sortkey">7004368600000000000♠</span>100 years, 335 days {{age in years and days|1918|5|27}} 100 years, 335 days
- {{ayd}} outputs a hidden sort key before the age, while {{age in years and days}} does not. The reason using the latter appears to be an improvement is that none of the ages for deceased leaders have a sort key, so it works better when the alive leaders also do not have a sort key.
- The correct method would be to use ayd for every entry in the table—that would make all entries sort correctly. Problem: currently the deceased leaders have fixed text for their age. For example, Chau Sen Cocsal Chhum has "103 years, 143 days". The fix would involve getting the birth and death dates from the article and using them (the dates can use any reasonable syntax):
{{ayd|1 September 1905|22 January 2009}}
→ 103 years, 143 days
- That would require quite a lot of work. An alternative would involve inserting a manual sort key which needs to be the age expressed in days. This example would be:
{{ntsh|{{#expr:103*365+143}}}}103 years, 143 days
- Using 365.25 instead of 365 would be slightly more accurate but probably not worth the trouble. Johnuniq (talk) 04:00, 27 April 2019 (UTC)
- OK, that makes sense. Thanks Emk9 (talk) 05:52, 27 April 2019 (UTC)
Template-protected edit request on 14 September 2019
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
There are some good templates for sortable tables:
- {{age in years and days}} -> {{age in years and days nts}}
- {{age in years}} -> {{age in years nts}}
- {{age in days}} -> {{age in days nts}}
Could someone please add this for age in years and months also?
- {{age in years and months}} -> {{age in years and months nts}} Joseph (talk) 09:58, 14 September 2019 (UTC)
- I could think about that but the fact that {{age in years and months nts}} was created less than an hour ago indicates that there has been no need for it in the past. At any rate, the module supports several parameters, one of which controls sorting:
{{age in years and months|10 Jan 2001|20 Feb 2012}}
→ 11 years, 1 month (normal output, not sortable){{age in years and months|10 Jan 2001|20 Feb 2012|sortable=on}}
→ 11 years, 1 month (sortable; use Special:ExpandTemplates to see the output){{age in years and months|10 Jan 2001|20 Feb 2012|sortable=debug}}
→ 7003405800000000000♠11 years, 1 month (shows the sort key)
- That is, a new template is not really needed. This should have started with a discussion, not an edit request, because the latter is used with a "complete and specific description of the request". Johnuniq (talk) 10:49, 14 September 2019 (UTC)
- I could think about that but the fact that {{age in years and months nts}} was created less than an hour ago indicates that there has been no need for it in the past. At any rate, the module supports several parameters, one of which controls sorting:
- sortable=on works, thanks!.--Joseph (talk) 12:24, 14 September 2019 (UTC)