[Vobject] date/time representations

Matt Price matt.price at utoronto.ca
Fri Oct 22 01:37:06 CDT 2004

I'm just following up on an earlier message from someone else that
I've foolishly deleted -- wouldn't it make sense for the date fields
in vevents to be represented internally by datetime.datetime objects?
iCal.py hasthe following code to parse date values:  

    def parseDate(self, dateStr):
        year = int(dateStr[0:4])
        if year < 1970:
            year = 1970

        month = int(dateStr[4:4+2])
        day = int(dateStr[6:6+2])
            hour = int(dateStr[9:9+2])
            minute = int(dateStr[11:11+2])
            hour = 0
            minute = 0

        return datetime.datetime(year, month, day, hour, minute)

so far it's worked ok for me.  I was also wondering about RRULE's --
how should they be represented internally?  since they can repeat
'forever' it seems they can't be a simple list of date objects...


Matt Price	    matt.price at utoronto.ca
History Department, University of Toronto
(416) 978-2094

please don't use the following addresses:  zeus at derailleur.org
aardvark at derailleur.org

More information about the Vobject mailing list