Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Age: Difference between revisions

Template page
Shane (talk | contribs)
No edit summary
 
Shane (talk | contribs)
No edit summary
Line 1: Line 1:
<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude>[[Category:Templates using ParserFunctions|{{PAGENAME}}]]</noinclude>
<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly>
<noinclude>
=Documentation=
This template returns the number of full years between two dates, or between a specified date and today (UTC).
 
; Syntax
:{{tlp|{{PAGENAME}}|''year1''|''month1''|''day1''|''year2''|''month2''|''day2''}}
:{{tlp|{{PAGENAME}}|''year1''|''month1''|''day1''}}
 
;Examples
*<nowiki>{{age|1989|7|23|2003|7|14}}</nowiki> gives {{age|1989|7|23|2003|7|14}}
*<nowiki>{{age|1989|7|23}}</nowiki> gives {{age|1989|7|23}}
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
</noinclude>

Revision as of 08:11, 15 September 2006


Documentation

This template returns the number of full years between two dates, or between a specified date and today (UTC).

Syntax
{{Age|year1|month1|day1|year2|month2|day2}}
{{Age|year1|month1|day1}}
Examples
  • {{age|1989|7|23|2003|7|14}} gives 13
  • {{age|1989|7|23}} gives 35