This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
I will be adding an optional second parmaeter so that the month can also be displayeed. Such as February 1950 (age 57–58). Sometimes the month is known just the day is missing. pete 15:46, 14 April 2008 (UTC)
{{birth year and age|1989|10}}
it shouldn't display "October 1989 (age 19–20)", but "October 1989 (age 19)" until September 30, and "October 1989 (age 20)" after that. --
bender235 (
talk)
23:46, 6 May 2009 (UTC){{ editprotected}}
All documentation says it uses an n-dash, –, as a year range separator, but an hyphen-minus, -, is actually produced. Leandro GFC Dutra ( talk) 14:48, 29 December 2010 (UTC)
–
which generates an en-dash, i.e. –. --
Redrose64 (
talk)
17:07, 29 December 2010 (UTC)This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add a check for current date = 31 December (the last day of the year). In this case, it doesn't matter what month or day-month the person was born, we can explicitly determine their age in years as the simple difference between the current year and their birth year. Truthanado ( talk) 10:27, 7 September 2012 (UTC)
As far as I can tell, this is the only template can be used when only the birth year is known. However, the age calculation function isn't always needed. Can the template be modified to override the age display? Senator2029 ➔ “Talk” 04:10, 25 April 2014 (UTC)
I have added some basic error checking to the sandbox version of this template. See Template talk:Birth date and age and Template talk:Death date and age for previous discussions of this type of error checking.
The new code checks for month values that are less than 1 or greater than 12. It checks for years that are in the future, and for years that are more than 150 years in the past, since this template is supposed to be used only for living people.
Here are some examples of invalid dates that display an error message using the sandbox code:
Comments are welcome. – Jonesey95 ( talk) 03:17, 7 April 2015 (UTC)
|df=
. –
Jonesey95 (
talk)
20:18, 19 September 2016 (UTC)This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I would like to change this to place the articles that use this template into Category:X Births. Numberguy6 ( talk) 20:47, 23 January 2020 (UTC)
{{
edit template-protected}}
template.
qedk (
t 桜
c)
20:51, 23 January 2020 (UTC)
This currently reads "1967 (age 53–54)". But the dash usually indicates an inclusive interval, meaning the person is "53 through 54 years old". But the person isn't 53 through 54 years old: no one can be 53 through 54 years old: he's either 53 or 54 years old and we simply don't know which. The dash should be replaced by an "or". 195.192.229.9 ( talk) 13:01, 14 July 2021 (UTC)
I am trying to use this template to refer to an individual animal (born in 1809, still living today). Understandably, the template thinks that 1809
is an invalid date; so, I would like there to be a way to manually override the "invalid date" display.
Example:
1809 (age 214–215) invalid year
.
Zhing'za zï Ïnin ( talk) 21:42, 1 March 2023 (UTC)
"1809 (age {{age in years|1809}})"
→ "1809 (age 214–215)"This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
I will be adding an optional second parmaeter so that the month can also be displayeed. Such as February 1950 (age 57–58). Sometimes the month is known just the day is missing. pete 15:46, 14 April 2008 (UTC)
{{birth year and age|1989|10}}
it shouldn't display "October 1989 (age 19–20)", but "October 1989 (age 19)" until September 30, and "October 1989 (age 20)" after that. --
bender235 (
talk)
23:46, 6 May 2009 (UTC){{ editprotected}}
All documentation says it uses an n-dash, –, as a year range separator, but an hyphen-minus, -, is actually produced. Leandro GFC Dutra ( talk) 14:48, 29 December 2010 (UTC)
–
which generates an en-dash, i.e. –. --
Redrose64 (
talk)
17:07, 29 December 2010 (UTC)This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add a check for current date = 31 December (the last day of the year). In this case, it doesn't matter what month or day-month the person was born, we can explicitly determine their age in years as the simple difference between the current year and their birth year. Truthanado ( talk) 10:27, 7 September 2012 (UTC)
As far as I can tell, this is the only template can be used when only the birth year is known. However, the age calculation function isn't always needed. Can the template be modified to override the age display? Senator2029 ➔ “Talk” 04:10, 25 April 2014 (UTC)
I have added some basic error checking to the sandbox version of this template. See Template talk:Birth date and age and Template talk:Death date and age for previous discussions of this type of error checking.
The new code checks for month values that are less than 1 or greater than 12. It checks for years that are in the future, and for years that are more than 150 years in the past, since this template is supposed to be used only for living people.
Here are some examples of invalid dates that display an error message using the sandbox code:
Comments are welcome. – Jonesey95 ( talk) 03:17, 7 April 2015 (UTC)
|df=
. –
Jonesey95 (
talk)
20:18, 19 September 2016 (UTC)This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I would like to change this to place the articles that use this template into Category:X Births. Numberguy6 ( talk) 20:47, 23 January 2020 (UTC)
{{
edit template-protected}}
template.
qedk (
t 桜
c)
20:51, 23 January 2020 (UTC)
This currently reads "1967 (age 53–54)". But the dash usually indicates an inclusive interval, meaning the person is "53 through 54 years old". But the person isn't 53 through 54 years old: no one can be 53 through 54 years old: he's either 53 or 54 years old and we simply don't know which. The dash should be replaced by an "or". 195.192.229.9 ( talk) 13:01, 14 July 2021 (UTC)
I am trying to use this template to refer to an individual animal (born in 1809, still living today). Understandably, the template thinks that 1809
is an invalid date; so, I would like there to be a way to manually override the "invalid date" display.
Example:
1809 (age 214–215) invalid year
.
Zhing'za zï Ïnin ( talk) 21:42, 1 March 2023 (UTC)
"1809 (age {{age in years|1809}})"
→ "1809 (age 214–215)"