MonthCalendar

This macro is for those who need a calendar wiki integration or want to use MoinMoin as a Personal Information Manager.

Usage

<<MonthCalendar(item,year,month,month_offset,fixed_height,anniversary)>>

Parameter name Possible values Default value Description
item Item name current page Base page for calendar entry pages.
year Integer number current year Year to display on calendar.
month 1..12 current month Base month using for displaying calendar.
month_offset Integer number 0 Offset added to month for displaying.
fixed_height True or False False When this parameter set to 1, calendar aligned at height of 6 lines.
anniversary True or False False Year calendar (no year in page links).

Each parameter can be empty and then defaults to currentpage or currentdate or monthoffset=0

When an event is entered on a date, that date will be highlighted on the calendar, which you can also mouse over and get a javascript pop-up. To get a summary in that pop-up, put the summary in a heading 1 case, like = Big Birthday Today! =

Examples

The simplest version looks like this:

Markup Result
<<MonthCalendar>>
January 2026
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 

The previous month's calendar for page "OtherUser" looks like that:
Markup Result
<<MonthCalendar(item="OtherUser",month_offset=-1)>>
December 2025
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
293031    

Calendar of Page SampleUser, this year's december:
Markup Result
<<MonthCalendar(item="SampleUser",month=12)>>
December 2026
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031   

Calendar of current Page, this year's december:
Markup Result
<<MonthCalendar(month=12)>>
December 2026
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031   

Calendar of December, 2021:
Markup Result
<<MonthCalendar(year=2021,month=12)>>
December 2021
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar of the month two months after December, 2021 (maybe doesn't make much sense, but is possible)
Markup Result
<<MonthCalendar(year=2021,month=12,month_offset=+2)>>
February 2022
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28      

Calendar of year 2023 (every month padded to height of 6 rows):

Markup:

||||||||<bgcolor="#ffffcc"> '''Year 2023'''                                                             ||
||||||Year 2023||
||<<MonthCalendar(year=2023,month=1,fixed_height=true)>>||<<MonthCalendar(year=2023,month=2,fixed_height=true)>>||<<MonthCalendar(year=2023,month=3,fixed_height=true)>>||
||<<MonthCalendar(year=2023,month=4,fixed_height=true)>>||<<MonthCalendar(year=2023,month=5,fixed_height=true)>>||<<MonthCalendar(year=2023,month=6,fixed_height=true)>>||
||<<MonthCalendar(year=2023,month=7,fixed_height=true)>>||<<MonthCalendar(year=2023,month=8,fixed_height=true)>>||<<MonthCalendar(year=2023,month=9,fixed_height=true)>>||
||<<MonthCalendar(year=2023,month=10,fixed_height=true)>>||<<MonthCalendar(year=2023,month=11,fixed_height=true)>>||<<MonthCalendar(year=2023,month=12,fixed_height=true)>>||

Result:

Year 2023
January 2023
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
February 2023
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728     
       
March 2023
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
April 2023
MonTueWedThuFriSatSun
     12
3456789
10111213141516
17181920212223
24252627282930
       
May 2023
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
293031    
       
June 2023
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
2627282930  
       
July 2023
MonTueWedThuFriSatSun
     12
3456789
10111213141516
17181920212223
24252627282930
31      
August 2023
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031   
       
September 2023
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 
       
October 2023
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
November 2023
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
27282930   
       
December 2023
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031
       

Anniversary Calendars: (no year data)
Markup Result
<<MonthCalendar(item="Yearly",month_offset=+1,
fixed_height=True,anniversary=True)>>
February 2026
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
232425262728 
       
This creates calendars of the format Yearly/MM-DD. By leaving out the year, you can set birthdays, and anniversaries in this calendar and not have to re-enter each year.

see also: help-en/MoinWikiMacros