Template:Age: Difference between revisions

From Hattrick
Jump to navigationJump to search
Brishcanae (talk | contribs)
No edit summary
Crazycompgeek (talk | contribs)
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#expr:({{{4|{{CURRENTYEAR}}}}})-({{{1}}})-(({{{5|{{CURRENTMONTH}}}}})<({{{2}}})or({{{5|{{CURRENTMONTH}}}}})=({{{2}}})and({{{6|{{CURRENTDAY}}}}})<({{{3}}}))}}</includeonly><noinclude>
<noinclude>{{Interwiki/Age}}</noinclude><!--
{{template doc}}
--><includeonly>{{#expr:floor{{#expr:{{JULIANDIFF|{{#time:Y}}|{{#time:m}}|{{#time:d}}|{{{1}}}|{{{2}}}|{{{3}}}}}/112}}}} {{Translate|years}} {{Translate|and}} {{#expr:{{JULIANDIFF|{{#time:Y}}|{{#time:m}}|{{#time:d}}|{{{1}}}|{{{2}}}|{{{3}}} }} mod 112}} {{Translate|days}}</includeonly><noinclude>{{documentation}}</noinclude>
</noinclude>

Latest revision as of 11:25, 13 September 2014

INTERWIKI

· Català · English · Español · Italiano · Magyar ·

[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 51 years and 109 days
{{Age|2009|10|10}} produces 55 years and 26 days
{{Age|2008|10|10}} produces 58 years and 55 days
{{Age|2002|10|10}} produces 78 years and 7 days