Template:AddDays: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>ZachPruckowski
(put in test version - appears to be working)
imported>Caesar Schinas
(Simpler code (but is this template needed anyway?))
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#ifexpr: {{CURRENTDAY}} + {{{1}}} > {{DaysInMonth|{{CURRENTMONTH}} }}
<includeonly>{{#time:Ymd|+ {{{1}}} days}}</includeonly>
|{{#ifexpr: {{CURRENTMONTH}} = 12
<noinclude>
  |{{#expr:{{CURRENTYEAR}} +1}}01{{AddDays/LeadZero| {{#expr:{{CURRENTDAY2}} + {{{1}}} - {{DaysInMonth|{{CURRENTMONTH}} }}  }} }}
This template adds a set number of days to the current date and returns the new date.<br />
  |{{CURRENTYEAR}}{{AddDays/LeadZero|{{#expr:{{CURRENTMONTH}} +1}} }}{{AddDays/LeadZero|{{#expr: {{CURRENTDAY}} + {{{1}}} - {{DaysInMonth|{{CURRENTMONTH}} }} }} }}
Usage: {{tlc|AddDays|N}}, where N is a number of days.
  }}
</noinclude>
|{{CURRENTYEAR}}{{CURRENTMONTH}}{{AddDays/LeadZero|{{#expr: {{CURRENTDAY}} + {{{1}}} }} }}
}}
 
<!--{{CURRENTYEAR}}{{CURRENTMONTH}}{{#expr: {{CURRENTDAY}} + {{{1}}} }}--!>

Latest revision as of 09:50, 15 June 2009


This template adds a set number of days to the current date and returns the new date.
Usage: {{AddDays|N}}, where N is a number of days.