Working with calendars¶
Calendar & CalendarSet Modules
Changelog¶
| Version | Description |
|---|---|
| 3.0.1 | Bugfix if no CalendarInfo was given in the xml file |
| 3.0.0 | Renamed to Calendar, and constructor doesn't read anymore from xml node, use CalendarSet to build the object. |
| 1.5.7 | Class CalendarInfo added. |
Documentation¶
CalendarInfo Class¶
Attributes: id (int): id of calendar name (str): name of calendar holidays (list): list of dates of holidays bridge_days (list): list of dates of bridge days.
CalendarSet Class¶
This is the manager object of the Calendar class. A commodity can have multiple calendars. For example, a holiday calendar but also a bridge day calendar.
Examples:
>>> from kyoslib_py.settings import CalendarSet
>>> calendar_set = CalendarSet.from_xml()
>>> calendar = calendar_set.get_calendar(1)
>>> calendar.get_name()
'NL'