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

Module eventcalendar

source code

Classes [hide private]
  LocalTimezone
  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 EVENT entry in a calendar for our purposes.
  EventSet
I represent a set of EVENT entries in a calendar sharing the same uid.
Functions [hide private]
 
toDateTime(d)
If d is date, convert it to datetime.
source code
list of {EventSet}
parseCalendar(cal)
Take a Calendar object and return a list of EventSet objects.
source code
list of {EventSet}
parseCalendarFromFile(file)
Parse a given file into EventSets.
source code
Variables [hide private]
  LOCAL = LocalTimezone()
Function Details [hide private]

toDateTime(d)

source code 

If d is date, convert it to datetime.

Parameters:
  • d (It can be anything, even None. However, it will convert only if it is an event instance of date.)
Returns:
If d was an event instance of date, it returns the equivalent datetime.Otherwise, it returns d.

parseCalendar(cal)

source code 

Take a Calendar object and return a list of EventSet objects.

Parameters:
  • cal (icalendar.Calendar) - The calendar to "parse"
Returns: list of {EventSet}

parseCalendarFromFile(file)

source code 

Parse a given file into EventSets.

Parameters:
  • file (file object)
Returns: list of {EventSet}