Template talk:Age in years and months

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

North Korea Example[edit]

6 years, 5 months since their last ICBM test

I noticed a bug in this template.[edit]

Today's Date: August 9, 2010 Wiki Page: Supreme Court of the United States Section on Page: Current justices

In the row "Ruth Bader Ginsburg", her start date is "August 10, 1993", but it only showed "16 years" as her Length of service, rather than the expected "16 years, 11 months)".

The formula on the page seems correct. It reads (curly brackets removed so that the source displays):

   age in years and months|1993|8|10

Somehow, the formula is off. On this day she is one day from being exactly 17 years of service, but I tried 5 earlier days (the preceding 5) and they were also incorrect.

RSStockdale (talk) 19:02, 9 August 2010 (UTC)[reply]

Repeat evidence of bug[edit]

On Oct 26 2010, 12:30pm GMT, got the following results
age in years and months|1977|10|26}} 33y (correct)
age in years and months|1977|10|27}} 32y (incorrect, should be 32y 11m)
age in years and months|1977|10|28}} 32y ...
age in years and months|1977|10|29}} 32y ...
age in years and months|1977|10|30}} 32y ...
age in years and months|1977|10|31}} 32y (incorrect, should be 32y 11m)
age in years and months|1977|11|1}} 32y 11m (correct) --Rye1967 (talk) 11:57, 26 October 2010 (UTC)[reply]

Another report of the problem[edit]

{{age in years and months|2003|03|20|2011|01|20}} returns "7 years, 10 months" (ok)
{{age in years and months|2003|03|20|2011|02|20}} returns "7 years, 11 months" (ok)
{{age in years and months|2003|03|20|2011|02|28}} returns "7 years, 11 months" (ok)
{{age in years and months|2003|03|20|2011|03|01}} returns "7 years, 11 months" (problem)
{{age in years and months|2003|03|20|2011|03|19}} returns "7 years, 11 months" (problem)
{{age in years and months|2003|03|20|2011|03|20}} returns "8 years" (ok)
{{age in years and months|2003|03|20|2011|04|20}} returns "8 years, 1 month" (ok)

70.51.33.82 (talk) 18:44, 5 March 2011 (UTC)[reply]

Two years later, this is still a problem: {{age in years and months|1975|3|21|1983|3|11}} returns 7 years, 11 months. It should return "7 years, 11 months" or "8 years". -Rrius (talk) 06:47, 25 March 2013 (UTC)[reply]

Possible bugs[edit]

Hello. I was updating the Supreme Federal Court webpage, and before that I noticed this template was not showing in the 9th row of a table that exists there (Rosa Weber's term). I checked the page but I couldn't identify any errors on its usage. The only thing I noticed was this is the only date in December in the table (bug?).

Moreover, when I added another instance of the template in the 10th row of that table (Teori Zavascki's term), again it doesn't show anything. In this case, could it be because the difference between the informed date and the current date is less than 1 month?

Many thanks in advance.

Etp01 (talk) 13:31, 1 December 2012 (UTC)[reply]

I've replaced the template with a version using Module:Age (see WP:Lua for background). Testing suggests that the problems mentioned on this talk page have been fixed. Please report any new issues here. Johnuniq (talk) 02:09, 2 April 2013 (UTC)[reply]

Another bug[edit]

At the article Australian Labor Party, the template as used for a gap between 26 July 2013 and the current date (29 August 2013 UTC, as of writing) is showing "1 month". When the current date is manually entered, it puts out "2 months". -Rrius (talk) 14:41, 29 August 2013 (UTC)[reply]

  • I removed the template and put it back, and it seems to be working. I don't if if this was a browser issue or what, but I guess it isn't a problem with the template itself. -Rrius (talk) 14:46, 29 August 2013 (UTC)[reply]
    • You looked at the article today when the "age" was just over one month, so the template should have said "2 months". What probably happened is that you were looking at a cached html version of the page. If you had looked at the html source in your browser and searched for "timestamp", you might have seen a comment with something like "timestamp 20130826233030", meaning that the html was created on 2013-August-26, at which time the template would have given the result "1 month". Any edit to the page, even a WP:NULLEDIT, would have generated the page again, with the correct result. Probably adding ?action=purge to the URL would also have updated the page. Johnuniq (talk) 23:36, 29 August 2013 (UTC)[reply]