Template:AgeYears: Difference between revisions
From Hattrick
Jump to navigationJump to search
Created page with '<includeonly>{{#expr:floor{{#expr:{{JULIANDIFF|{{#time:Y}}|{{#time:m}}|{{#time:d}}|{{{1}}}|{{{2}}}|{{{3}}} }} / 112}}}} years</includeonly><noinclude>{{documentation}}</noinclude…' |
mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{#expr:floor{{#expr:{{JULIANDIFF|{{#time:Y}}|{{#time:m}}|{{#time:d}}|{{{1}}}|{{{2}}}|{{{3}}} }} / 112}}}} | <includeonly>{{#expr:floor{{#expr:{{JULIANDIFF|{{#time:Y}}|{{#time:m}}|{{#time:d}}|{{{1}}}|{{{2}}}|{{{3}}} }} / 112}}}}</includeonly><noinclude>{{documentation}}</noinclude> | ||
Latest revision as of 20:18, 14 February 2011
[edit]
Template documentation
- Explanation
- Calculates the Hattrick years that have passed from a date x until now (and rounds them). Typical use: automatical player age display, hence the name.
- Syntax
- {{Age | YEAR | MONTH | DAY }}
- Examples
- {{AgeYears|2010|10|10}} produces 51
- {{AgeYears|2009|10|10}} produces 55
- {{AgeYears|2008|10|10}} produces 58
- {{AgeYears|2002|10|10}} produces 78