Syntax highlighting of help-en/008f25e ~( MoinWikiMacros/MonthCalendar)

= 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)>>`

||<rowbgcolor="#ffffcc"> '''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:
||<bgcolor="#ffffcc"> '''Markup'''       ||<bgcolor="#ffffcc"> '''Result'''   ||<style="border:none; width:99%">  ||
|| `<<MonthCalendar>>`                   || <<MonthCalendar>>                 ||<style="border:none; width:99%">  ||
||||||<style="border:none; text-align:left"> <<BR>>The previous month's calendar for page "OtherUser" looks like that: ||
||<bgcolor="#ffffcc"> '''Markup'''       ||<bgcolor="#ffffcc"> '''Result'''   ||<style="border:none; width:99%">  ||
|| `<<MonthCalendar(item="OtherUser",month_offset=-1)>>` || <<MonthCalendar(item="OtherUser",month_offset=-1)>> ||<style="border:none; width:99%"> ||
||||||<style="border:none; text-align:left"> <<BR>>Calendar of Page SampleUser, this year's december:  ||
||<bgcolor="#ffffcc"> '''Markup'''       ||<bgcolor="#ffffcc"> '''Result'''   ||<style="border:none; width:99%">  ||
|| `<<MonthCalendar(item="SampleUser",month=12)>>` || <<MonthCalendar(item="SampleUser",month=12)>> ||<style="border:none; width:99%"> ||
||||||<style="border:none; text-align:left"> <<BR>>Calendar of current Page, this year's december: ||
||<bgcolor="#ffffcc"> '''Markup'''       ||<bgcolor="#ffffcc"> '''Result'''   ||<style="border:none; width:99%">  ||
|| `<<MonthCalendar(month=12)>>`         || <<MonthCalendar(month=12)>>       ||<style="border:none; width:99%">  ||
||||||<style="border:none; text-align:left"> <<BR>>Calendar of December, 2021: ||
||<bgcolor="#ffffcc"> '''Markup'''       ||<bgcolor="#ffffcc"> '''Result'''   ||<style="border:none; width:99%">  ||
|| `<<MonthCalendar(year=2021,month=12)>>` || <<MonthCalendar(year=2021,month=12)>>  ||<style="border:none; width:99%"> ||
||||||<style="border:none; text-align:left"> <<BR>>Calendar of the month two months after December, 2021 (maybe doesn't make much sense, but is possible) ||
||<bgcolor="#ffffcc"> '''Markup'''       ||<bgcolor="#ffffcc"> '''Result'''   ||<style="border:none; width:99%">  ||
|| `<<MonthCalendar(year=2021,month=12,month_offset=+2)>>` || <<MonthCalendar(year=2021,month=12,month_offset=+2)>> ||<style="border:none; width:99%"> ||

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''':
{{{#!wiki
||||||||<bgcolor="#ffffcc"> '''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)>>||
}}}

||||||<style="border:none; text-align:left"> <<BR>>Anniversary Calendars: (no year data) ||
||<bgcolor="#ffffcc"> '''Markup'''    ||<bgcolor="#ffffcc"> '''Result'''                                                ||<style="border:none; width:99%"> ||
|| `<<MonthCalendar(item="Yearly",month_offset=+1,`<<BR>>`fixed_height=True,anniversary=True)>>`    || <<MonthCalendar(item="Yearly",month_offset=+1,fixed_height=True,anniversary=True)>>                     ||<style="border:none; width:99%"> ||
||||||<style="border:none; text-align:left"> 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]]