|
|
Line 1: |
Line 1: |
| <includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude> | | <includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude> |
| This template returns the number of full years between two dates, or between a specified date and today (UTC).
| | {{doc}} |
| | | </noinclude> |
| Syntax:
| |
| *<nowiki>{{age|year1|month1|day1}}</nowiki> - for age up to now
| |
| *<nowiki>{{age|year1|month1|day1|year2|month2|day2}}</nowiki> - for date up to date2
| |
| | |
| Examples:
| |
| | |
| *<nowiki>{{age|1989|7|23|2003|7|14}}</nowiki> - gives 13
| |
| *<nowiki>{{age|1989|7|23}}</nowiki> - gives 17
| |
| | |
| | |
| If you use this template for calculating someone's age at death or age at a certain date (rather than their current age), please substitute it into the page, for example: {{#expr:(2003)-(1989)-((7)<(7)or(7)=(7)and(14)<(23))}}.
| |
| </noinclude><noinclude>
| |
| [[Category:Templates|{{PAGENAME}}]]</noinclude>
| |