Package flumotion :: Package common :: Module eventcalendar
[hide private]

Module eventcalendar

source code

Classes [hide private]
  Point
I represent a start or an end point linked to an event instance of an event.
  EventInstance
I represent one event instance of an event.
  Event
I represent a VEVENT entry in a calendar for our purposes.
  EventSet
I represent a set of VEVENT entries in a calendar sharing the same uid.
  Calendar
I represent a parsed iCalendar resource.
  NotCompilantError
Functions [hide private]
datetime.datetime or anything
_toDateTime(d)
If d is a datetime.date, convert it to datetime.datetime.
source code
 
vDDDToDatetime(v, timezones)
Convert a vDDDType to a datetime, respecting timezones.
source code
datetime.timedelta
vDDDToTimedelta(v)
Convert a vDDDType (vDuration) to a timedelta.
source code
 
parseTimezone(vtimezone)
Parses a VTIMEZONE section and returns a tzinfo
source code
Calendar
fromICalendar(iCalendar)
Parse an icalendar Calendar object into our Calendar object.
source code
Calendar
fromFile(file)
Create a new calendar from an open file object.
source code
Variables [hide private]
  HAS_ICALENDAR = False
  HAS_DATEUTIL = False
  __package__ = 'flumotion.common'
Function Details [hide private]

_toDateTime(d)

source code 

If d is a datetime.date, convert it to datetime.datetime.

Parameters:
  • d (anything)
Returns: datetime.datetime or anything
The equivalent datetime.datetime if d is a datetime.date; d if not

vDDDToDatetime(v, timezones)

source code 

Convert a vDDDType to a datetime, respecting timezones.

Parameters:
  • v (icalendar.prop.vDDDTypes) - the time to convert
  • timezones - Defined timezones in the calendar

vDDDToTimedelta(v)

source code 

Convert a vDDDType (vDuration) to a timedelta.

Parameters:
  • v (icalendar.prop.vDDDTypes) - the duration to convert
Returns: datetime.timedelta

fromICalendar(iCalendar)

source code 

Parse an icalendar Calendar object into our Calendar object.

Parameters:
Returns: Calendar

fromFile(file)

source code 

Create a new calendar from an open file object.

Parameters:
  • file (file object)
Returns: Calendar