views:

9

answers:

0

I'm trying to figure out what the best way to find all instances of recurring events in a given date range for a whole set of calendars. Most of the examples I've seen (e.g. Fowler's paper on Temporal Expressions) seem to focus on querying a single event and asking if it's occurring at a certain time, which I'm not sure would work at the scale I'm looking at.

I'm hoping to support the full RFC-2445 set of RRULEs, so I think simple date arithmetic is out of the question.

So far, the only thing I've come up with is to materialize the instance of the recurring event into real event records for a certain span of time (e.g. a year ahead). This certainly makes querying simpler, but it means I have to be more vigilant when the rule is modified and seems a little hackish. Still, it might be acceptable if no one has some kind of killer suggestion.

Thanks.