Difference between revisions of "Template:Age in days"

From Team Fortress Wiki
Jump to: navigation, search
(Created page with '<includeonly>{{#expr: + {{Gregorian serial date |month = {{{month2|{{{5|{{CURRENTMONTH}}}}}}}} |day = {{{day2|{{{6|{{CURRENTDA…')
 
(this always annoyed me)
Line 1: Line 1:
 
<includeonly>{{#expr:
 
<includeonly>{{#expr:
 
         + {{Gregorian serial date
 
         + {{Gregorian serial date
                       |month = {{{month2|{{{5|{{CURRENTMONTH}}}}}}}}
+
                       |month = {{{month2|{{{5|{{LOCALMONTH}}}}}}}}
                       |day = {{{day2|{{{6|{{CURRENTDAY}}}}}}}}
+
                       |day = {{{day2|{{{6|{{LOCALDAY}}}}}}}}
                       |year = {{{year2|{{{4|{{CURRENTYEAR}}}}}}}}
+
                       |year = {{{year2|{{{4|{{LOCALYEAR}}}}}}}}
 
           }}
 
           }}
 
         - {{Gregorian serial date
 
         - {{Gregorian serial date
                       |month = {{{month1|{{{2|{{CURRENTMONTH}}}}}}}}
+
                       |month = {{{month1|{{{2|{{LOCALMONTH}}}}}}}}
                       |day = {{{day1|{{{3|{{CURRENTDAY}}}}}}}}
+
                       |day = {{{day1|{{{3|{{LOCALDAY}}}}}}}}
                       |year = {{{year1|{{{1|{{CURRENTYEAR}}}}}}}}
+
                       |year = {{{year1|{{{1|{{LOCALYEAR}}}}}}}}
 
           }} }}</includeonly><noinclude>
 
           }} }}</includeonly><noinclude>
 
{{Template doc}}
 
{{Template doc}}
 
</noinclude>
 
</noinclude>

Revision as of 06:26, 24 March 2011

Template documentation [view] [edit] [history] [purge]

Usage

This template returns the number of days between two dates. If the second set of parameters is not included it will automatically calculate the days between a given date and today. To use type:

{{age in days|month1= |day1= |year1= |month2= |day2= | year2=}}, or with unnames parameters:
{{age in days|year1|month1|day1|year2|month2|day2}} or
{{age in days|year1|month1|day1}}

Examples:

  • {{age in days|2007|5|24|2008|4|23}} gives 335
  • {{age in days|2007|5|24}} gives 6388