Difference between revisions of "Template:Age in days"

From Conservapedia
Jump to navigation Jump to search
(New page: <noinclude> This template returns the number of days that have elapsed between two dates. If the second set of parameters is not included it will automatically calculate the days between a...)
 
(Standard documentation)
Line 1: Line 1:
−
<noinclude>
+
<includeonly>{{#expr:
−
This template returns the number of days that have elapsed 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: '''<nowiki>{{Age in days|month1= |day1= |year1= |month2= |day2= | year2=}}</nowiki>'''
 
−
</noinclude><includeonly>{{#expr:
 
 
         + {{Gregorian serial date
 
         + {{Gregorian serial date
 
                       |month = {{{month2|{{CURRENTMONTH}}}}}
 
                       |month = {{{month2|{{CURRENTMONTH}}}}}
Line 13: Line 11:
 
           }} }}</includeonly><noinclude>[[Category:Date mathematics templates|{{PAGENAME}}]]
 
           }} }}</includeonly><noinclude>[[Category:Date mathematics templates|{{PAGENAME}}]]
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
 +
</noinclude><noinclude>
 +
{{TemplateDoc|pages=Any|purpose=Calculates the number of days between two dates|cat=Date mathematics templates}}
 +
{{Parms|
 +
{{Parm|month1|yes (see note)|month of start date|current month}}
 +
{{Parm|day1|yes (see note)|day of month of start date|today's date}}
 +
{{Parm|year1|yes (see note)|year of start date|current year}}
 +
{{Parm|month2|yes (see note)|month of end date|current month}}
 +
{{Parm|day2|yes (see note)|day of month of end date|today's date}}
 +
{{Parm|year2|yes (see note)|year of end date|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: '''<nowiki>{{Age in days|month1= |day1= |year1= |month2= |day2= | year2=}}</nowiki>'''
 
</noinclude>
 
</noinclude>

Revision as of 12:21, June 2, 2007



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 yes (see note) month of start date current month
day1 yes (see note) day of month of start date today's date
year1 yes (see note) year of start date current year
month2 yes (see note) month of end date current month
day2 yes (see note) day of month of end date today's date
year2 yes (see note) year of end date 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=}}