From psagers at ignorare.net Tue Nov 2 17:40:28 2010 From: psagers at ignorare.net (Peter Sagerson) Date: Tue, 2 Nov 2010 09:40:28 -0700 Subject: [icalendar-dev] datetime encoding Message-ID: <8B167386-DFD3-4D9B-B590-46632BE8C1D1@ignorare.net> Yup, same deal. I didn't check back that far in the archives. Comparing against the return of type() isn't recommended in general, although it's probably reasonably safe in this case. On Nov 2, 2010, at 9:25 AM, Joe Sapp wrote: > On 10/29/2010 06:44 PM, Peter Sagerson wrote: >> Hello, >> >> Thanks for the nice library. I believe that r69670 has a regression when >> encoding datetime values. When I add a datetime object to an event, I get >> something like >> >> DTSTART;VALUE=DATE:20101028T080000 >> >> which seems incorrect. The problem is that datetime is apparently a >> subclass of date, so isinstance(dt, date) won't distinguish between the >> two. Adding a negative instance check for datetime corrects this.[1] >> >> Thanks, Peter >> >> >> [1] https://bitbucket.org/psagers/icalendar/changeset/4dd2dbf6c806 > > See http://codespeak.net/pipermail/icalendar-dev/2010-March/000151.html . I think it does the same thing. Nobody responded to that message, so thanks for the independent verification. > > Joe From sappj at ieee.org Tue Nov 2 17:25:02 2010 From: sappj at ieee.org (Joe Sapp) Date: Tue, 02 Nov 2010 12:25:02 -0400 Subject: [icalendar-dev] datetime encoding In-Reply-To: <057E8C38-D81D-4C9E-8A11-A956892521E9@ignorare.net> References: <057E8C38-D81D-4C9E-8A11-A956892521E9@ignorare.net> Message-ID: <4CD03B5E.1090306@ieee.org> On 10/29/2010 06:44 PM, Peter Sagerson wrote: > Hello, > > Thanks for the nice library. I believe that r69670 has a regression when > encoding datetime values. When I add a datetime object to an event, I get > something like > > DTSTART;VALUE=DATE:20101028T080000 > > which seems incorrect. The problem is that datetime is apparently a > subclass of date, so isinstance(dt, date) won't distinguish between the > two. Adding a negative instance check for datetime corrects this.[1] > > Thanks, Peter > > > [1] https://bitbucket.org/psagers/icalendar/changeset/4dd2dbf6c806 See http://codespeak.net/pipermail/icalendar-dev/2010-March/000151.html . I think it does the same thing. Nobody responded to that message, so thanks for the independent verification. Joe From brett at theholdfast.com Fri Nov 5 18:14:30 2010 From: brett at theholdfast.com (Brett Duncavage) Date: Fri, 5 Nov 2010 11:14:30 -0600 Subject: [icalendar-dev] Recurring events with no expiration Message-ID: <2F63C1E5-2F56-4B8B-8945-391530F1C04C@theholdfast.com> Hi, I'm needing to create calendars that have recurring events with no expiration. The use case is: User wants to be reminded to do a task every day at a specified time. Calendar should have that event listed on every day, at the same time, indefinitely. User wants to remove reminder. Calendar should remove all instances of event. Is that possible? Secondary question: Is there a remove_subcomponent or equivalent method? Thanks! Brett From regebro at gmail.com Mon Nov 8 14:00:17 2010 From: regebro at gmail.com (Lennart Regebro) Date: Mon, 8 Nov 2010 14:00:17 +0100 Subject: [icalendar-dev] Recurring events with no expiration In-Reply-To: <2F63C1E5-2F56-4B8B-8945-391530F1C04C@theholdfast.com> References: <2F63C1E5-2F56-4B8B-8945-391530F1C04C@theholdfast.com> Message-ID: On Fri, Nov 5, 2010 at 18:14, Brett Duncavage wrote: > Hi, > > I'm needing to create calendars that have recurring events with no expiration. The use case is: > > User wants to be reminded to do a task every day at a specified time. > Calendar should have that event listed on every day, at the same time, indefinitely. > User wants to remove reminder. > Calendar should remove all instances of event. > > Is that possible? Yes. > Secondary question: Is there a remove_subcomponent or equivalent method? No idea. From tomk at gentoo.org Mon Nov 8 14:18:57 2010 From: tomk at gentoo.org (Tom Knight) Date: Mon, 8 Nov 2010 13:18:57 +0000 Subject: [icalendar-dev] Recurring events with no expiration In-Reply-To: <2F63C1E5-2F56-4B8B-8945-391530F1C04C@theholdfast.com> References: <2F63C1E5-2F56-4B8B-8945-391530F1C04C@theholdfast.com> Message-ID: <20101108131857.GP11917@woodpecker.gentoo.org> On Fri, Nov 05, 2010 at 11:14:30AM -0600, Brett Duncavage wrote: > Secondary question: Is there a remove_subcomponent or equivalent method? The ClassessDict class that is the base for all calendar components implements the __delitem__ method so you can use the del statement to remove subcomponents, e.g.: del cal['prodid'] Cheers, Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://codespeak.net/pipermail/icalendar-dev/attachments/20101108/cf01e712/attachment-0001.pgp From sappj at ieee.org Tue Nov 9 00:29:36 2010 From: sappj at ieee.org (Joe Sapp) Date: Mon, 08 Nov 2010 18:29:36 -0500 Subject: [icalendar-dev] Recurring events with no expiration In-Reply-To: <2F63C1E5-2F56-4B8B-8945-391530F1C04C@theholdfast.com> References: <2F63C1E5-2F56-4B8B-8945-391530F1C04C@theholdfast.com> Message-ID: <4CD887E0.7000606@ieee.org> On 11/05/2010 01:14 PM, Brett Duncavage wrote: > Hi, > > I'm needing to create calendars that have recurring events with no expiration. The use case is: > > User wants to be reminded to do a task every day at a specified time. > Calendar should have that event listed on every day, at the same time, indefinitely. > User wants to remove reminder. > Calendar should remove all instances of event. Seems like that's the simplest type of recurring event. Your software would have to implement the second half, but it seems easy enough. Joe