Template:Age in years: Difference between revisions
Appearance
Content deleted Content added
Waldyrious (talk | contribs) allow end year |
Add age range code, since someone born in a given year can be one of two ages today. |
||
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 13:45, 3 April 2015
Expression error: Unrecognized punctuation character "–".–2023–2024
This template is used on approximately 3,800 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
Usage
{{Age in years|2000}} yields Expression error: Unrecognized punctuation character "–".–23–24. {{Age in years|1900|1950}} yields Expression error: Unrecognized punctuation character "–".–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.