Template:AddDays: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>ZachPruckowski
No edit summary
imported>ZachPruckowski
m (rm spaces - fix format error?)
Line 1: Line 1:
<includeonly>
<includeonly>
{{#ifexpr: {{CURRENTDAY}} + {{{1}}} > {{DaysInMonth|{{CURRENTMONTH}} }}
{{#ifexpr: {{CURRENTDAY}} + {{{1}}} > {{DaysInMonth|{{CURRENTMONTH}} }}|{{#ifexpr: {{CURRENTMONTH}} = 12|{{#expr:{{CURRENTYEAR}} +1}}01{{AddDays/LeadZero|{{#expr:{{CURRENTDAY2}} + {{{1}}} - {{DaysInMonth|{{CURRENTMONTH}} }}  }} }}|{{CURRENTYEAR}}{{AddDays/LeadZero|{{#expr:{{CURRENTMONTH}} +1}}}}{{AddDays/LeadZero|{{#expr: {{CURRENTDAY}} + {{{1}}} - {{DaysInMonth|{{CURRENTMONTH}}}}}}}}}}|{{CURRENTYEAR}}{{CURRENTMONTH}}{{AddDays/LeadZero|{{#expr: {{CURRENTDAY}} + {{{1}}}}}}}}}
|{{#ifexpr: {{CURRENTMONTH}} = 12
  |{{#expr:{{CURRENTYEAR}} +1}}01{{AddDays/LeadZero| {{#expr:{{CURRENTDAY2}} + {{{1}}} - {{DaysInMonth|{{CURRENTMONTH}} }}  }} }}
  |{{CURRENTYEAR}}{{AddDays/LeadZero|{{#expr:{{CURRENTMONTH}} +1}} }}{{AddDays/LeadZero|{{#expr: {{CURRENTDAY}} + {{{1}}} - {{DaysInMonth|{{CURRENTMONTH}} }} }} }}
  }}
|{{CURRENTYEAR}}{{CURRENTMONTH}}{{AddDays/LeadZero|{{#expr: {{CURRENTDAY}} + {{{1}}} }} }}
}}
</includeonly>
</includeonly>
<noinclude>
<noinclude>

Revision as of 10:25, 19 April 2007


This template adds a set number of days to the current date and returns the new date.

Useage: {{AddDays|N}} where N is a number of days less than about 28 (only handles 1 month increment)