icalendar.prop.dt.types module#
Combined property type for the date and time properties from RFC 5545.
- class icalendar.prop.dt.types.vDDDTypes(dt, params=None)[source]#
Bases:
TimeBaseA combined Datetime, Date or Duration parser/generator. Their format cannot be confused, and often values can be of either types. So this is practical.
- VALUE_MAP: dict[str, vDate | vTime | vDatetime | vDuration | vPeriod] = {'DATE': <class 'icalendar.prop.dt.date.vDate'>, 'DATE-TIME': <class 'icalendar.prop.dt.datetime.vDatetime'>, 'DURATION': <class 'icalendar.prop.dt.duration.vDuration'>, 'PERIOD': <class 'icalendar.prop.dt.period.vPeriod'>, 'TIME': <class 'icalendar.prop.dt.time.vTime'>}#
Map the VALUE parameters of the different types to their class.
- classmethod from_jcal(jcal_property)[source]#
Parse jCal from RFC 7265.
- Parameters:
jcal_property (
list) – The jCal property to parse.- Raises:
JCalParsingError – If the provided jCal is invalid.
- Return type:
- classmethod from_xcal(xml)[source]#
Parse xCal according to RFC 6321.
- Parameters:
parser – Required. The xCal to parse or a parser.
params – Required. The parameters of the xCal element.
- Raises:
XCalParsingError – If the provided xCal is invalid.
- Return type:
VProp
- classmethod from_xcal_in_recur(xml)[source]#
Parse xCal according to RFC 6321.
- Parameters:
parser – Required. The xCal to parse or a parser.
params – Required. The parameters of the xCal element.
- Raises:
XCalParsingError – If the provided xCal is invalid.
- Return type:
VProp
- params: Parameters#
- property td: timedelta#
Compatibility property returning
self.dt.This class is used to replace different time components. Some of them contain a datetime or date (
.dt). Some of them contain a timedelta (.td). This property allows interoperability.