Template:Cal-date/offset: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Derik (talk | contribs)
No edit summary
Derik (talk | contribs)
No edit summary
Line 45: Line 45:
-->{{#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}}}}}|}}<!--
-->{{#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}}}}}|}}<!--


 
getoffsetday - Get the day offset
 
Get the day offset
NOTE: THIS DOES NOT WORK IF THE NUMBER OF DAYS BEING OFFSET IS MORE THAN 1, SUCK ON IT.
NOTE: THIS DOES NOT WORK IF THE NUMBER OF DAYS BEING OFFSET IS MORE THAN 1, SUCK ON IT.
 
params: getoffsetday (day), offset, month
--><!--{{#if:{{{dayoffset|}}}|
{{#if|{{#expr: ({{{dayoffset}}} + {{{offset|0}}}) < 1 }}|{{cal-date/offset_recurs|daysinmonth={{cal-date/offset_recurs|monthoffset=1}} }}|}}
 




if day + > days in month, day = day+ - days in month.  Month++
-->{{#if:{{{getoffsetday|}}}|{{#if:{{cal-date/offset_recurs|isprevmonth={{{getoffsetday}}}|offset={{{offset}}}|month={{{month}}}}}{{cal-date/offset_recurs|isnextmonth={{{getoffsetday}}}|offset={{{offset}}}|month={{{month}}}}}|{{#if:{{cal-date/offset_recurs|isprevmonth={{{getoffsetday}}}|offset={{{offset}}}|month={{{month}}}}}|{{cal-date/offset_recurs|daysinmonth={{cal-date/offset_recurs|getoffsetmonth={{{month}}}|offset={{{offset|0}}}|day={{{getoffsetday}}}}}}}|1}}|{{{getoffsetday}}}}}|}}<!--
|}}


-->
-->

Revision as of 09:17, 18 March 2009