Template:Age/doc: Difference between revisions

From Hattrick
Jump to navigationJump to search
Lleida (talk | contribs)
mNo edit summary
Lirion (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
;Explanation
:Calculates the ''Hattrick'' time (years and days) that has passed from a date ''x'' until now. Typical use: automatical player age display, hence the name. For years only, use ''Template:AgeYears''.
;Syntax
;Syntax
:<nowiki>{{Age | YEAR | MONTH | DAY }}</nowiki>
:<nowiki>{{Age | YEAR | MONTH | DAY }}</nowiki>
Line 6: Line 8:
:<nowiki>{{Age|2008|10|10}}</nowiki> produces {{Age|2008|10|10}}
:<nowiki>{{Age|2008|10|10}}</nowiki> produces {{Age|2008|10|10}}
:<nowiki>{{Age|2002|10|10}}</nowiki> produces {{Age|2002|10|10}}
:<nowiki>{{Age|2002|10|10}}</nowiki> produces {{Age|2002|10|10}}
<noinclude>[[Category:Template documentation|Age]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>
<includeonly>[[Category:Date-computing templates|{{PAGENAME}}]]</includeonly>
<includeonly>[[Category:Date-computing templates|{{PAGENAME}}]]</includeonly>

Latest revision as of 16:32, 27 May 2013

Explanation
Calculates the Hattrick time (years and days) that has passed from a date x until now. Typical use: automatical player age display, hence the name. For years only, use Template:AgeYears.
Syntax
{{Age | YEAR | MONTH | DAY }}
Examples
{{Age|2010|10|10}} produces 51 years and 110 days
{{Age|2009|10|10}} produces 55 years and 27 days
{{Age|2008|10|10}} produces 58 years and 56 days
{{Age|2002|10|10}} produces 78 years and 8 days