Template:Age: Difference between revisions
From Hattrick
Jump to navigationJump to search
Brishcanae (talk | contribs) No edit summary |
Brishcanae (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> | <includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude> | ||
{{ | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 14:32, 4 July 2011
[edit]
Template documentation
- 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 15
- {{Age|2009|10|10}} produces 16
- {{Age|2008|10|10}} produces 17
- {{Age|2002|10|10}} produces 23