XML Definition of Calendars
Learn how to define your own country calendars.
To define your own country calendars use the following syntax:
Notes
Notes are included in the xml files in the <
!--
-->
element.
<!--
ID is 10 -->
<calendar> and <holiday> Elements
Holidays are defined within the <calendar>
element. A <holiday>
element is defined for each holiday.
<
calendar
>
<holiday m=
'1' d
='1' />
</calendar>
Calendar Name
Use the <text>
element to determine the name of the calendar in all the available languages:
<calendar>
<text
lang
='0'>Mein Kalender</text>
<text
lang
='1'>My Calendar</text>
<holiday m=
'1' d
='1' />
</calendar>
If you do not define a name, the catalog text for the selected calendar ID is used as name (fixed catalog "Calendar").
Fixed Holidays
Fixed holidays are defined using the base='fixed'
attribute. This attribute is the default value and need not be specified. m={1,2,...,12}
defines the month; d={1,2,...,31}
defines the day.
Examples:
<holiday m=
'1' d
='1' />
The 1st of January is a holiday.
<holiday base='fixed' m=
'12' d
='25' />
The 25th of December is a holiday.
Variable Holidays
Use the attribute base='easter'
to define holidays relative to Easter Sunday. Determine the number of days before or after Easter Sunday using diff
={
n}
. A positive value for n means n days after Easter Sunday; a negative value means n days before Easter Sunday.
Example:
<holiday base='easter' diff='39' />
The 39th day after Easter Sunday is a holiday.
Naming Holidays
The names of holidays are displayed in the calendar in the header in the daily view, in the small calendar and in the daily and working week views as tooltips.
Enter the name of the holiday in all available languages using the text element within the holiday element.
All text must be entered in an XML compatible format; i.e. special characters may need to be coded (e.g. use '&' to enter an ampersand).
Example:
<holiday m=
'1' d
='1'>
<text
lang
='0'>Neujahr</text>
<text
lang
='2'>Jour de l'An</text>
<text
lang
='-1'>New Year's Day</text>
</holiday>
lang
='#'
determines the language, see Language IDs. If no name has been defined
for a language, the default value (-1) is used.
Abbreviations for weekdays
Weekdays are abbreviated as follows:
Mo, Tu, We, Th, Fr, Sa, Su
Rescheduling Holidays that Fall on a Weekend
If a holiday falls on a specific day, the holiday can be rescheduled.
Example:
<holiday m="9" d="1" day="Sa" subst="+2"/>
If the 1st of September is a Saturday, the holiday is rescheduled for the following Monday (2 days later).
Fixed Weekdays
The attribute weekday and last are used to determine a weekday within a month. In this case the d attribute determines the day.
Example:
<holiday m="9" d="2" weekday="Mo" />
The second Monday in September is a holiday
<holiday m="9" d="1" last="Mo" />
The last Monday in September is a holiday.
Holidays that do not Occur Annually
The every attribute determine that a holiday does not take place annually but every 'n' years. The intervals are counted from the year 2000.
<holiday m="4" d="8" every="5" />
The 4th of August is a holiday every 5 years (2005, 2005 etc.)