Template talk:Age in days

message: This is a useful template that should get more wider use. It is especially useful for lists counting title reigns. Alex43223 Talk | Contribs | E-mail | C 00:34, 28 February 2007 (UTC)
thread_title:  Used 

message: Does it count leap days and other such calendar mysteries?  --Brandon Dilbeck 01:47, 15 March 2007 (UTC)
replies: text: Yes. It should uses the Template:Gregorian serial date which should that into account (according to that template-page). /AB-me (chit-chat) 17:32, 19 March 2007 (UTC)
replies: text: Okay.  Phew.  --Brandon Dilbeck 19:23, 19 March 2007 (UTC)
thread_title:  Leap days? 

message: These two examples fail, because they do not name their arguments:
*March 21, 2007 was  days ago.
*May 24, 2007 was  days ago.
Try again with argument names:
*March 21, 2007 was  days ago.
*May 24, 2007 was  days ago.
===Arguments===
Why does this template even ask for arguments?  Other similar templates like  do not.  --Arctic Gnome (talk • contribs) 21:28, 7 August 2007 (UTC)
thread_title: Sandbox

message: Why does this template even ask for arguments?  Other similar templates like  do not.  --Arctic Gnome (talk • contribs) 21:28, 7 August 2007 (UTC)
thread_title: Arguments

message: Please add de:Vorlage:Tagesdifferenz.--Tilla2501 12:55, 18 August 2007 (UTC)
thread_title:  Interwiki 

message: Please add :no:Mal:Alder i dager. Nsaa 21:14, 26 September 2007 (UTC)
thread_title:  IW 

message: Could the template be modified to insert seperators into a search outcome (eg 3,258 rather than 3258)? --GW_SimulationsUser Page | Talk 15:41, 22 October 2007 (UTC)
thread_title:  Seperators 

message: 
Please use . 16@r (talk) 03:02, 29 January 2008 (UTC)
replies: text: Done - Nihiltres{t.l} 19:09, 30 January 2008 (UTC)
thread_title:  Documentation 

message: Can any template-writers figure this puzzle out for me?  In sortable tables, numbers will sometimes be sorted by digit rather than by number, making it look like 20 is bigger than 100.  I want to make this template add an invisible zero using  the template  to the beginning of two-digit numbers, and two invisible zeros to the beginning of one digit numbers.  In practise this fixes the sortable tables, but making it work with this template would take me quite a while of figuring.  I think it can be done by coding that if RESULT is < 10, then print "RESULT" and if RESULT is < 100 then print "RESULT".  Another option to make it work with the tables is to somehow incorporate the template  into it. Thanks  --Arctic Gnome (talk • contribs) 05:36, 20 March 2008 (UTC)
replies: text: In sandbox testing, just enclosing this template in  seems to work.  I was expecting (knock on wood) it to be much more complicated.  --Arctic Gnome (talk • contribs) 05:52, 20 March 2008 (UTC)
thread_title:  Make this sort better 

message: Hello,I created a table showing length of services for different Senators. The problem I have is that for currently serving Senators I used the template  which is supposed to sort correctly, but it doesn't. Any ideas? Victor Victoria (talk) 01:21, 27 August 2010 (UTC)
replies: text: You are right to use Template:Age in days nts instead of Template:Age in days. But because it adds hidden zeroes and treats commas specially, it needs to be used in all the cells for the relevant column. At the moment, it is only present for those senators still serving, so they are sorting at the end of the list. Also, the commas in the wikitext for those senators who have served more than 999 days are causing the numbers to be treated as text (so that, say, 120 sorts between 12 and 13). Using  throughout will fix this too, because it hides the commas from the sorting script. — Richardguk (talk) 03:43, 27 August 2010 (UTC)
replies: text: I guess this problem has no fix at the moment. The same problem exists in List of United States Supreme Court Justices by time in office. Victor Victoria (talk) 03:58, 27 August 2010 (UTC)
replies: text:  You seem to misunderstand me. The fix does exist: simply replace the number of days (for those senators no longer serving) with  where month1/day1/year1 is the start date and month2/day2/year2 is the end date (you might possibly need to adjust day2 by 1 in each case, depending on whether the end date has been counted as well as the start date). Once every row is using  in the "days" column, it will sort properly. The same fix will work for the table in the Supreme Court Justices article. — Richardguk (talk) 05:29, 27 August 2010 (UTC)
replies: text: Thanks for your help — it worked just like you promised. I'll fix the List of United States Supreme Court Justices by time in office later when I get some time. Victor Victoria (talk) 12:26, 27 August 2010 (UTC)
replies: text: Using Template:Age in days nts needlessly adds load time for senators that are retired.  You can instead use the number in the simple Template:NTS.  —Arctic Gnome (talk • contribs) 20:51, 3 September 2010 (UTC)
thread_title:  Women in the United States Senate 

message: Summary: extend this template to handle dates before Common Era.
Description:  throws an error for BCE dates and so makes this template unusable if either of the two ends of the interval is BCE.  As a side-effect,  cannot handle BCE intervals and some (rare) intervals that span the BCE/CE boundary.
Suggestion: Use  if any of the two ends of the interval is BCE,  otherwise (as currently).  Specify BCE dates using astronomical year numbering.  , unlike , uses the proleptic Gregorian calendar, and is thus equivalent to  for measuring time intervals.
Proposed new template: .
Test cases: User:Miranche/Template Age in days testcases.
Thoughts? – Miranche T C 01:32, 4 February 2012 (UTC)
thread_title:  Suggestion: handle BCE dates 

message: I created Module:Age to fix some problems reported with , then experimented by adding some code to implement  and . I do not know if this template has any performance issues, but if wanted, it could be replaced with the module. More information is at Module talk:Age. Johnuniq (talk) 10:04, 2 April 2013 (UTC)
thread_title:  Module:Age 

message: ===Inputting full dates===
Code has been adjusted to allow for full dates to be input as parameters 1 and 2.
:e.g.  → 
Jimp 08:44, 10 April 2015 (UTC)
thread_title:  New stuff 

message: Code has been adjusted to allow for full dates to be input as parameters 1 and 2.
:e.g.  → 
Jimp 08:44, 10 April 2015 (UTC)
thread_title: Inputting full dates

message: will sort according to the number of seconds (using the SI unit for consistency across various template, e.g. ).  This will make  redundant. Jimp 08:44, 10 April 2015 (UTC)
thread_title: Sorting

message: The template did not format numbers correctly.  Numbers were not delimited and negative numbers were output with a hyphen instead of a negative sign.  This formatting is good if the number is to be used for further calculations; however it is bad for display in articles.  Of course, for numbers between 0 and 999 inclusive, this is unimportant, but outside of this range, it's problematic.  Two new formatting options have been added:  will give true minus signs and add commas as per  and  will give true minus signs and add thin spaces as per  whilst  will produce the unformatted numbers with hyphens for minus signs as has been used in the past.  Note that for year, month and day input the default is still the raw form (this template is used by others); however, for full-date input the default is commas (the most commonly used formatting on WP). Jimp 08:44, 10 April 2015 (UTC)
thread_title: Formatting

message: Editors may not know whether the number of days will be one or not.  How do you pluralise in this case?   sorts this out by giving "day" or "days" as appropriate.    gives an abbreviation, "d".  The default is still not to give units. Jimp 08:44, 10 April 2015 (UTC)
thread_title: Displaying the unit

message: Note that a space before the "2" (in the last parameter) causes an error. Whitespace should be trimmed. – Wbm1058 (talk) 23:20, 13 February 2016 (UTC)
thread_title:  Unexpected number error: spaces cause error message 

message: I'm trying to increase the consistency of some of the age templates by using Module:Age. The main motivation is so sorting with the nts templates such as  will be consistent with other age templates such as .
A preliminary test is at Template:Age in days/testcases2 which uses the tests from Template:Age in days/testcases but uses a system that can automatically check the results.  uses the module and its results are compared with those from  at Template talk:Age in days/testcases2. Currently that is showing hundreds of fails due to differences in the wikitext produced. I can't see any substantive differences and will investigate it further. I'm putting this note here for anyone interested but also as a reminder to myself about where I put the tests. Johnuniq (talk) 10:04, 30 December 2017 (UTC)
replies: text: After doing some search-and-replace changes to the tests for expected differences, the test results show that  agrees with . Johnuniq (talk) 04:43, 2 January 2018 (UTC)
thread_title:  Module:Age tests 

message: I have nominated this template for merging with Template:Date difference. Please add the following text to the top of the template:
 
--67.183.136.85 (talk) 21:25, 25 December 2021 (UTC)
replies: text: User:GKFXtalk 21:31, 25 December 2021 (UTC)
thread_title:  TPER — Add TfD notice 

message: The time zones feature is now probably broken.  Even the provided example failed when I tried to test it.  So consider this a bug report.  With best wishes, RobbieIanMorrison (talk) 08:42, 13 May 2024 (UTC)
replies: text: Thanks for the report. I have updated the documentation to remove items that applied to the old template, but which have not applied since April 2018 when the template was switched to use Module:Age. The feature of adding a timezone offset was not used and is no longer supported. Johnuniq (talk) 10:06, 13 May 2024 (UTC)
thread_title:  Time zones feature probably broken