Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
icalendar.prop.vTime Class Reference
Inheritance diagram for icalendar.prop.vTime:
Inheritance graph
Collaboration diagram for icalendar.prop.vTime:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def ical
def from_ical
def __str__

Public Attributes


Static Public Attributes

tuple from_ical = staticmethod(from_ical)

Detailed Description

A subclass of datetime, that renders itself in the iCalendar time
>>> dt = vTime(12, 30, 0)
>>> dt.ical()

>>> vTime.from_ical('123000')
datetime.time(12, 30)

We should also fail, right?
>>> vTime.from_ical('263000')
Traceback (most recent call last):
ValueError: Expected time, got: 263000

Definition at line 1020 of file

Constructor & Destructor Documentation

def icalendar.prop.vTime.__init__ (   self,

Definition at line 1038 of file

01039     def __init__(self, *args, **kwargs):
01040         time.__init__(self, *args, **kwargs)
01041         self.params = Parameters()

Member Function Documentation

Definition at line 1054 of file

01055     def __str__(self):
01056         return self.ical()

Here is the call graph for this function:

Definition at line 1045 of file

01046     def from_ical(ical):
01047         "Parses the data format from ical text format"
01048         try:
01049             timetuple = map(int, (ical[:2],ical[2:4],ical[4:6]))
01050             return time(*timetuple)
01051         except:
            raise ValueError, 'Expected time, got: %s' % ical
def icalendar.prop.vTime.ical (   self)

Definition at line 1042 of file

01043     def ical(self):
01044         return self.strftime("%H%M%S")

Here is the caller graph for this function:

Member Data Documentation

tuple icalendar.prop.vTime.from_ical = staticmethod(from_ical) [static]

Definition at line 1052 of file

Definition at line 1040 of file

The documentation for this class was generated from the following file: