మూస:Month Calendar
స్వరూపం
| [[{{{basepage}}}/{{{year}}} {{{previousmonth}}}|<<]] | [[{{{basepage}}}/{{{year}}} {{{month}}}|{{{month}}} {{{year}}}]] | [[{{{basepage}}}/{{{year}}} {{{nextmonth}}}|>>]] | ||||
| S | M | T | W | T | F | S |
Documentaion
[<small>మార్చు</small>]Note: Optional parameter nextyear and previousyear are used to specify if nextmonth/previousmonth belongs to different year than year
Read only mode
[<small>మార్చు</small>]{{Month Calendar
|year=2012
|month=మే
|offset=2
|max=31
|basepage=Wiktionary:నేటి_పదం
|nextmonth=జూన్
|previousmonth=
}}
| << | మే 2012 | >> | ||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
Write mode
[<small>మార్చు</small>]Node: mode=w
{{Month Calendar
|year=2012
|month=మే
|offset=2
|max=31
|basepage=Wiktionary:నేటి_పదం
|nextmonth=జూన్
|previousmonth=
|mode=w
}}
| << | మే 2012 | >> | ||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
A template line with Indentation
[<small>మార్చు</small>]Note: Remove this section if logic is straightforward.
{{#ifeq:
{{#expr:
{{#expr:
{{#expr: 1 - {{{offset}}}}} > 0 }}
and
{{#expr:
{{#expr: 1 - {{{offset}}}}}
<=
{{{max}}}
}}
}}
|1
|{{#ifeq:
{{{mode}}}
|w
|[[{{{basepage}}}/{{{year}}}_{{{month}}}_{{#expr: 1 - {{{offset}} }}} | {{#expr: 1 - {{{offset}}} }} ]]
|{{#ifexist: {{{basepage}}}/{{#expr: 1 - {{{offset}}}}}
|[[{{{basepage}}}/{{{year}}}_{{{month}}}_{{#expr: 1 - {{{offset}}}}}|{{#expr: 1 - {{{offset}}}}}]]
| {{#expr: 1 - {{{offset}}} }}
}}
}}
|
}}
Logic
[<small>మార్చు</small>]if( ((val-offset) >0) && ((val-offset) <=max) )
{
if(mode==w)
{
[[basepage/year_month_(val-offset)|(val-offset)]]
}
else if (pageExitst( [basepage/year_month_(val-offset)) ){
[[basepage/year_month_(val-offset)|(val-offset)]]
}
else{
(val-offset)
}
}