icalendar.prop.float module#
FLOAT values from RFC 5545.
- class icalendar.prop.float.vFloat(*args, params=None, **kwargs)[source]#
Bases:
floatFloat
- Value Name:
FLOAT
- Purpose:
This value type is used to identify properties that contain a real-number value.
- Format Definition:
This value type is defined by the following notation:
float = (["+"] / "-") 1*DIGIT ["." 1*DIGIT]
- Description:
If the property permits, multiple "float" values are specified by a COMMA-separated list of values.
Example:
1000000.0000001 1.333 -3.14
>>> from icalendar.prop import vFloat >>> float = vFloat.from_ical('1000000.0000001') >>> float 1000000.0000001 >>> float = vFloat.from_ical('1.333') >>> float 1.333 >>> float = vFloat.from_ical('+1.333') >>> float 1.333 >>> float = vFloat.from_ical('-3.14') >>> float -3.14
- classmethod from_jcal(jcal_property)[source]#
Parse jCal from RFC 7265.
- Parameters:
jcal_property (
list) – The jCal property to parse.- Raises:
JCalParsingError – If the jCal provided 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
- property ical_value: float#
Converts the FLOAT property type according to RFC 5545 Section 3.3.7 to a Python float.
- params: Parameters#