Difference between revisions of "Template:Age in days"

From Conservapedia
Jump to navigation Jump to search
m (Protected "Template:Age in days" [edit=sysop:move=sysop])
(tweak cat)
Line 1: Line 1:
 
<includeonly>{{#expr:
 
<includeonly>{{#expr:
 
         + {{Gregorian serial date
 
         + {{Gregorian serial date
−
                       |month = {{{month2|{{CURRENTMONTH}}}}}
+
                       |month = {{{month2|{{CURRENTMONTH}} }}}
−
                       |day = {{{day2|{{CURRENTDAY}}}}}
+
                       |day = {{{day2|{{CURRENTDAY}} }}}
−
                       |year = {{{year2|{{CURRENTYEAR}}}}}
+
                       |year = {{{year2|{{CURRENTYEAR}} }}}
 
           }}
 
           }}
 
         - {{Gregorian serial date
 
         - {{Gregorian serial date
−
                       |month = {{{month1|{{CURRENTMONTH}}}}}
+
                       |month = {{{month1|{{CURRENTMONTH}} }}}
−
                       |day = {{{day1|{{CURRENTDAY}}}}}
+
                       |day = {{{day1|{{CURRENTDAY}} }}}
−
                       |year = {{{year1|{{CURRENTYEAR}}}}}
+
                       |year = {{{year1|{{CURRENTYEAR}} }}}
 
           }} }}</includeonly><noinclude>[[Category:Date mathematics templates|{{PAGENAME}}]]
 
           }} }}</includeonly><noinclude>[[Category:Date mathematics templates|{{PAGENAME}}]]
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]

Revision as of 02:39, February 3, 2012



Template: Age in days
Use on Any
Use for Calculates the number of days between two dates
Category template applies to page Date mathematics templates
Template Parameters
(See using templates).
Name Purpose Required? Comment
month1 month of start date no (see note) defaults to current month
day1 day of month of start date no (see note) defaults to today's date
year1 year of start date no (see note) defaults to current year
month2 month of end date no (see note) defaults to current month
day2 day of month of end date no (see note) defaults to today's date
year2 year of end date no (see note) defaults to current year

Note: It is pointless omitting all parameters, as the calculation will then return zero (the number of days between today and today).

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=}}