Difference between revisions of "Template:Age in years"

From Team Fortress Wiki
Jump to: navigation, search
(this should do what you need it to...)
(Convert to using Module:Age)
 
Line 1: Line 1:
<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude>
+
<includeonly>{{#invoke:age|age_years}}</includeonly><noinclude>
{{template doc}}
+
{{Lua|Age}}
 +
{{Template doc}}
 
</noinclude>
 
</noinclude>

Latest revision as of 02:29, 18 November 2013

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

Usage

This template returns the number of full years between two specified dates. If the second set of parameters is not included, it will return the number of full years between a specified date and today's date.

Syntax:
{{Age in years|year1|month1|day1|year2|month2|day2}} or
{{Age in years|year1|month1|day1}}
Examples:
{{Age in years|1989|7|23|2003|7|14}} returns "13"
{{Age in years|1989|7|23}} returns "34"