Difference between revisions of "Template:Age in years"

From blackwiki
Jump to navigation Jump to search
blackwiki>Nick Mitchell 98
(Undid revision 654777590 by Jonesey95 (talk). Template has remained unchanged for three years, please do not completely remove it, instead add another coding option.)
blackwiki>WOSlinker
(having a range makes more sense)
Line 1: Line 1:
{{age|{{{1|0}}}|{{CURRENTMONTH}}|{{CURRENTDAY}}|{{{2|{{CURRENTYEAR}}}}}}}<noinclude>{{doc}}</noinclude>
+
{{#expr:{{age|{{{1|0}}}|{{CURRENTMONTH}}|{{CURRENTDAY}}|{{{2|{{CURRENTYEAR}}}}}}}-1}}–{{age|{{{1|0}}}|{{CURRENTMONTH}}|{{CURRENTDAY}}|{{{2|{{CURRENTYEAR}}}}}}}<noinclude>{{doc}}</noinclude>

Revision as of 11:45, 28 April 2015

2024–2025

Template documentation[view] [edit] [history] [purge]

Usage

{{Age in years|2000}} yields 24–25. {{Age in years|1900|1950}} yields 49–50.

Note that the template provides an age range: during the year 2015, someone born in 2000 is either 14 or 15 years old, depending on whether they have passed their birth date in the later year.

See also