[ANN] ICal occurrence API
J J
azreal1977 at hotmail.com
Mon May 28 19:27:06 UTC 2007
Interesting, I had no idea you were doing this. And thanks for stealing my
thunder! :) After you publish it, someone will have to compare the
different versions (speed, memory, ease of use, etc).
>From: "Alan Lovejoy" <squeak-dev.sourcery at forum-mail.net>
>Reply-To: The general-purpose Squeak developers
>list<squeak-dev at lists.squeakfoundation.org>
>To: "'The general-purpose Squeak developers
>list'"<squeak-dev at lists.squeakfoundation.org>
>Subject: RE: [ANN] ICal occurrence API
>Date: Mon, 28 May 2007 12:21:26 -0700
>
><JJ (Jason)>
>Features:
> - To my knowledge this is the most compliant implementation of
>Recurrence
>rules
> - Full support for Exclusion dates and exclusion rules (!)
></JJ (Jason)>
>
>The next release of Chronos will have full support for recurrence rules
>based on the iCal rule model--including exclusion dates and exclusion
>rules.
>
>The implementation is based on a recurrence rule algebra, so that
>recurrence
>rules can be specified using algegraic expressions, which are then
>evaluated
>according to a recurrence rule algebra.
>
>Example:
>
>(RecurrenceSet from: (2007 month: #February day: 9))
> add:
> (RecurrenceRule
> delta: 1 years count: 10
> temporalExpression: ((WeekOfMonth week: 0) &
>(#Sunday asDayOfWeek | #Saturday asDayOfWeek) not)
> occurrenceIndices: #(0)); "Chronos uses 0 as the
>ordinal of the last value or element."
> do: [:each | Transcript cr; show: each % #rfc2822]
>
>The iCal expression that specifies the same thing:
>
> DTSTART;TZID=America/Los_Angeles:2007-02-09
> RRULE:FREQ=YEARLY;COUNT=10;BYDAY=-1MO,-1TU,-1WE,-1TH,-1FR;BYSETPOS=-1
>
>The output:
>
>Wed, 28 Feb 2007
>Fri, 29 Feb 2008
>Fri, 27 Feb 2009
>Fri, 26 Feb 2010
>Mon, 28 Feb 2011
>Wed, 29 Feb 2012
>Thu, 28 Feb 2013
>Fri, 28 Feb 2014
>Fri, 27 Feb 2015
>Mon, 29 Feb 2016
>
>--Alan
>
>
>
_________________________________________________________________
Make every IM count. Download Messenger and join the im Initiative now.
Its free. http://im.live.com/messenger/im/home/?source=TAGHM_MAY07
More information about the Squeak-dev
mailing list
|