Template:Age: Difference between revisions

Want an adless experience? Log in or Create an account.
m
Text replacement - "<br>" to "<br/>"
mNo edit summary
m (Text replacement - "<br>" to "<br/>")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#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}}}))}}</onlyinclude></includeonly>
<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==
Line 5: Line 5:


==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/>
{{Desc|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/>
{{Desc|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}}