Difference between revisions of "Template:AgeUnit"

From Second Life Wiki
Jump to navigation Jump to search
m (Created page with "<includeonly>{{#vardefine:days|{{#expr:(({{ #time: U | {{LOCALDAY2}}.{{LOCALMONTH}}.{{LOCALYEAR}} }} - {{ #time: U | {{{1}}}.{{{2}}}.{{{3}}} }}) / 86400) round 0}}}}{{#ifexpr:{{…")
 
m
Line 1: Line 1:
<includeonly>{{#vardefine:days|{{#expr:(({{ #time: U | {{LOCALDAY2}}.{{LOCALMONTH}}.{{LOCALYEAR}} }} - {{ #time: U | {{{1}}}.{{{2}}}.{{{3}}} }}) /  86400) round 0}}}}{{#ifexpr:{{#var:days}} = 1|1 day|{{#ifexpr:{{#var:days}} < 90|{{#var:days}} days|{{#ifexpr:{{#var:days}} < 730|{{#expr:({{#var:days}} * 12) / 365.25}} months|{{#expr:{{#var:days}} / 365.25}} years}}}}}}</includeonly><noinclude>This template calculates a difference in days between a given date (past 01.01.1970) and the current date. Use it with <nowiki>{{Age|DD|MM|YYYY}}</nowiki>.</noinclude>
<includeonly>{{#vardefine:days|{{#expr:(({{ #time: U | {{LOCALDAY2}}.{{LOCALMONTH}}.{{LOCALYEAR}} }} - {{ #time: U | {{{1}}}.{{{2}}}.{{{3}}} }}) /  86400) round 0}}}}{{#ifexpr:{{#var:days}} = 1|1 day|{{#ifexpr:{{#var:days}} < 90|{{#var:days}} days|{{#ifexpr:{{#var:days}} < 730|{{#expr:(({{#var:days}} * 12) / 365.25) round 0}} months|{{#expr:({{#var:days}} / 365.25) round 0}} years}}}}}}</includeonly><noinclude>This template calculates a difference in days between a given date (past 01.01.1970) and the current date. Use it with <nowiki>{{Age|DD|MM|YYYY}}</nowiki>.</noinclude>

Revision as of 22:32, 5 March 2014

This template calculates a difference in days between a given date (past 01.01.1970) and the current date. Use it with {{Age|DD|MM|YYYY}}.