Misplaced Pages

Template talk:Age

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

This is an old revision of this page, as edited by Carcharoth (talk | contribs) at 14:57, 21 July 2006 (Please add current date to the display). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 14:57, 21 July 2006 by Carcharoth (talk | contribs) (Please add current date to the display)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
This template was considered for deletion on 2006 April 22. The result of the discussion was "keep".
This template was considered for deletion on 2006 July 2. The result of the discussion was "keep".

Template:age (backlinks edit).

See also Template:bha (backlinks edit) and Template:bdha (backlinks edit).

Documentation

This template returns the number of full years between two dates, or between a specified date and today (UTC).

Syntax:
{{Age|year1|month1|day1|year2|month2|day2}}
{{Age|year1|month1|day1}}

Examples:

  • {{age|1989|7|23|2003|7|14}} gives 13
  • {{age|1989|7|23}} gives 35

Discussion

Ever wonder how old your favorite child actor is? This template will help you satisfy your curiosity.

You can't just subtract the kid's birth year from the current year...

  • 23 July 1989 - 35 (boy)
  • 23 February 1994 - 30 (girl)

Be the first to identify the well-known actor whose birthdate and age are shown above! --Uncle Ed 20:14, 21 April 2006 (UTC)

Instead of checking the current age, you can also specify the date on which the age is measured, by passing 3 additional parameters. --Misza13 12:17, 24 April 2006 (UTC)

Call it {{years between}}? --Uncle Ed 15:55, 24 April 2006 (UTC)
And make it a redirect to {{age}}? :) --Misza13 17:20, 24 April 2006 (UTC)
No, I forgot that we can employ optional parameters. Your version is just fine. Let's just wait for the deletion votes to be tabulated, and then we can really start using the template. I have a whole bunch of ideas. --Uncle Ed 18:57, 24 April 2006 (UTC)

Tests

{{Age|{{CURRENTYEAR}}-19|{{CURRENTMONTH}}|{{CURRENTDAY}}}} = Error: Need valid year, month, day

{{Age|{{CURRENTYEAR}}-18|{{CURRENTMONTH}}-1|{{CURRENTDAY}}}} = Error: Need valid year, month, day

{{Age|{{CURRENTYEAR}}-18|{{CURRENTMONTH}}|{{CURRENTDAY}}-1}} = Error: Need valid year, month, day

{{Age|{{CURRENTYEAR}}-18|{{CURRENTMONTH}}|{{CURRENTDAY}}}} = Error: Need valid year, month, day

{{Age|{{CURRENTYEAR}}-18|{{CURRENTMONTH}}|{{CURRENTDAY}}+1}} = Error: Need valid year, month, day

{{Age|{{CURRENTYEAR}}-18|{{CURRENTMONTH}}+1|{{CURRENTDAY}}}} = Error: Need valid year, month, day

{{Age|{{CURRENTYEAR}}-17|{{CURRENTMONTH}}|{{CURRENTDAY}}}} = Error: Need valid year, month, day

{{Age|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}} = 0

Deletion controversy

See templates for deletion.

Date format

While this is a great template, I must say that I don't like that the (american?) MM/DD/YYYY format was chosen. I propose that we quickly switch to ISO 8601 YYYY/MM/DD and fix all current uses before it gets massively widespread. Misza13 12:21, 24 April 2006 (UTC)

The usage is already using the ISO format... Documentation was added, template was correctly categorized, and more tests were added. verdy_p 15:46, 5 May 2006 (UTC)

TfD nomination of Template:Age

Template:Age has been nominated for deletion. You are invited to comment on the discussion at the template's entry on the Templates for Deletion page. Thank you. FuriousFreddy 07:06, 2 July 2006 (UTC)

Please add current date to the display

For this template to be of real use, it needs to display the date when the age was calculated. This helps to time-proof such time-sensitive information. The date calculated would be shown for permanent media like a print or CD version, while the date calculated could be hidden for dynamic, current versions online. See User_talk:Cyde#Ages_and_updating_articles. Carcharoth 02:41, 21 July 2006 (UTC)

PS. This only applies to living people of course. Once someone is dead, the ages can be calculated and permanently edited in to the article. As indeed should ages for living people for what they did in the past. It is only the current age of living people that this applies to. Carcharoth 02:44, 21 July 2006 (UTC)
Pleas see Misplaced Pages:Village pump (policy)#Age in biographical articles. Jon513 06:58, 21 July 2006 (UTC)
I came here from that discussion! See my comments in that discussion. :-) Carcharoth 14:57, 21 July 2006 (UTC)