Difference between revisions of "Template:Age"

From Hattrick
m
 
Line 1: Line 1:
 
<noinclude>{{Interwiki/Age}}</noinclude><!--
 
<noinclude>{{Interwiki/Age}}</noinclude><!--
--><includeonly>{{#expr:floor{{#expr:{{JULIANDIFF|{{#time:Y}}|{{#time:m}}|{{#time:d}}|{{{1}}}|{{{2}}}|{{{3}}}}}/112}}}} years and {{#expr:{{JULIANDIFF|{{#time:Y}}|{{#time:m}}|{{#time:d}}|{{{1}}}|{{{2}}}|{{{3}}} }} mod 112}} days</includeonly><noinclude>{{documentation}}</noinclude>
+
--><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>

Latest revision as of 13: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 32 years and 12 days
{{Age|2009|10|10}} produces 35 years and 41 days
{{Age|2008|10|10}} produces 38 years and 70 days
{{Age|2002|10|10}} produces 58 years and 22 days