Template:Age: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
(Created template.)
 
m (Text replacement - "<br>" to "<br/>")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:MonthA|{{#iferror:{{#time:n|{{{1}}}}}|{{#expr:{{{1}}} mod 12}}|{{#time:n|{{{1}}}}}}}}}{{#vardefine:MonthB|{{#iferror:{{#time:n|{{{4|{{CURRENTMONTH}}}}}}}|{{#expr:{{{4|{{CURRENTMONTH}}}}} mod 12}}|{{#time:n|{{{4|{{CURRENTMONTH}}}}}}}}}}}{{#expr:({{{6|{{CURRENTYEAR}}}}})-({{{3}}})-(({{#var:MonthB}})<({{#var:MonthA}})or({{#var:MonthB}})=({{#var:MonthA}})and({{{5|{{CURRENTDAY}}}}})<({{{2}}}))}}</includeonly><noinclude>
<includeonly><onlyinclude>{{#vardefine:MonthA|{{#iferror:{{#time:n|{{{1}}}}}|{{#expr:({{{1}}}-1) mod 12+1}}|{{#time:n|{{{1}}}}}}}}}{{#vardefine:MonthB|{{#iferror:{{#time:n|{{{4|{{CURRENTMONTH}}}}}}}|{{#expr:({{{4|{{CURRENTMONTH}}}}}-1) mod 12+1}}|{{#time:n|{{{4|{{CURRENTMONTH}}}}}}}}}}}{{#expr:({{{6|{{CURRENTYEAR}}}}})-({{{3}}})-(({{#var:MonthB}})<({{#var:MonthA}})or({{#var:MonthB}})=({{#var:MonthA}})and({{{5|{{CURRENTDAY}}}}})<({{{2}}}))}}</onlyinclude></includeonly>
 
==Purpose==
==Purpose==
This template automatically calculates the time between two dates, in years. Either a two specific dates, or a past date and today's date.
This template automatically calculates the time between two dates, in years. Either a two specific dates, or a past date and today's date.


==Usage==
==Usage==
To use this template for a past date and today's date, type:<br>
To use this template for a past date and today's date, type:<br/>
{{NoWikiTemp|Normal|Month|Day|Year}}
{{Desc|Normal|Month|Day|Year}}


The parameters are self-explanatory.
The parameters are self-explanatory.


To use this template to calculate the time between to specific dates, type:<br>
To use this template to calculate the time between to specific dates, type:<br/>
{{NoWikiTemp|Normal|Month A|Day A|Year A|Month B|Day B|Year B}}
{{Desc|Normal|Month A|Day A|Year A|Month B|Day B|Year B}}


Again, the parameters are self-explanatory.
Again, the parameters are self-explanatory.


{{Cat|Formatting Templates}}</noinclude>
 
{{Cat|Utility Templates}}

Latest revision as of 17:10, February 8, 2015


Purpose

This template automatically calculates the time between two dates, in years. Either a two specific dates, or a past date and today's date.

Usage

To use this template for a past date and today's date, type:
    {{Age| Month | Day | Year }}

The parameters are self-explanatory.

To use this template to calculate the time between to specific dates, type:
    {{Age| Month A | Day A | Year A | Month B | Day B | Year B }}

Again, the parameters are self-explanatory.