Template:Cal-date/offset: Difference between revisions
From MediaWiki
Jump to navigationJump to searchmNo edit summary |
No edit summary |
||
| Line 29: | Line 29: | ||
params: isnextMonth (day), offset, month | params: isnextMonth (day), offset, month | ||
-->{{#if:{{{isnextmonth|}}}|{{#ifeq:{{#expr: ({{{isnextmonth}}} + {{{offset|0}}}) > {{cal-date/offset_recurs|daysinmonth={{{month|}}}}} }}|1|1|0}}|}}<!-- | -->{{#if:{{{isnextmonth|}}}|{{#ifeq:{{#expr: ({{{isnextmonth}}} + {{{offset|0}}}) > {{cal-date/offset_recurs|daysinmonth={{{month|}}}}} }}|1|1|}}|}}<!-- | ||
isprevmonth | |||
params: isprevMonth (day), offset, month | |||
-->{{#if:{{{isprevmonth|}}}|{{#ifeq:{{#expr: ({{{isprevmonth}}} + {{{offset|0}}}) < 1}}|1|1|}}|}}<!-- | |||
getoffsetmonth | |||
params: getoffsetmonth (month), offset, day | |||
returns: a numeric month | |||
NOTE: WILL NOT WORK CORRECTLY IF THE OFFSET IS MORE THAN A SINGLE DAY | |||
-->{{#if:{{{getoffsetmonth|}}}|{{#if:{{cal-date/offset_recurs|isprevmonth={{{day}}}|offset={{{offset}}}|month={{{getoffsetmonth}}}}}{{cal-date/offset_recurs|isnextmonth={{{day}}}|offset={{{offset}}}|month={{{getoffsetmonth}}}}}|{{cal-date/offset_recurs|monthoffset={{{getoffsetmonth}}}|offset={{{offset|0}}}}}|{{{getoffsetmonth}}}}}|}}<!-- | |||
Get the day offset | Get the day offset | ||

