Element Path: <cwt><CALENDAR>
The calendar assigns a day type to each weekday.
A day type is just a value that identifies the type of day. By default, Monday to Friday are day type 0, Saturday day type 1, and Sunday day type 2, all with their specific attributes, such as the tariffs used.
The day types can be used in tariffs to determine, for instance, that “if today is day type 4, then this specific tariff shall be used”.
•The calendar is configured by defining a Normal week. The day type assigned to a specific weekday in the normal week can be changed.
•Daylight saving time is configured with the attribute daylightSavingOffset
•Timezones are defined with utcTimeOffset
•Exceptions to the normal week (such as holy days and public holidays) are then defined by Calendar rules that define what day type should be used for each one of these days.
Example:
<CALENDAR utcTimeOffset="-240" daylightSavingOffset="60" normalWeek="0000012">
<!-- Daylight Savings Begin -->
<daylightSavingDateRule rule="3" month="3" day="8" hour="2" minute="0"
weekday="Sunday"/>
<!-- Daylight Savings End -->
<standardDateRule rule="3" month="11" day="1" hour="2" minute="0" weekday="Sunday"/>
<!-- New Year’s Day (Jan 1) -->
<calendarRule rule="1" month="1" day="1" dayType="2"/>
<!-- Family Day (3rd Monday of feb) -->
<calendarRule rule="3" month="2" day="14" weekday="Monday" dayType="2"/>
<!-- Good Friday -->
<calendarRule rule="4" month="99" day="98" dayType="2"/>
- - -
</CALENDAR>
See Calendar examples for more examples |