From sappj at ieee.org Tue Mar 30 03:14:30 2010 From: sappj at ieee.org (Joe Sapp) Date: Mon, 29 Mar 2010 21:14:30 -0400 Subject: [icalendar-dev] DATE parameter Message-ID: <4BB15076.70406@ieee.org> Hi all, In the constructor of the vDDDTypes class, it checks the instance of the argument in order to add the DATE parameter if necessary (prop.py:588). It seems to me that the problem with this test is that isinstance() also returns True for equality with subclasses of its second argument. Looking at section 4.3.4 of RFC 2445, the DATE parameter is only accepts a 4-digit year, 2-digit month, and 2-digit day; in other words, I think this is a Python 'date', not 'datetime'. This results in some incorrect applications of the DATE parameter (for example, when I added a datetime DTSTAMP). Am I reading all this right? If so, what do you think of the attached patch? Joe -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: date-type-test-in-vDDDTypes.patch Url: http://codespeak.net/pipermail/icalendar-dev/attachments/20100329/839a73aa/attachment.diff