Forward RRULE to some date
Milan Crha
mcrha at redhat.com
Wed Feb 3 08:24:02 PST 2016
Hi,
while I'm playing with RSCALE support for the evolution-data-server
calendar I realized that the current implementation
of icalrecur_iterator() doesn't allow Forward to some date.
What I mean with that?
Consider that you've a recurring meeting which begun in year 2000 and
it's repeated every week. If I ask for its instances for this year,
then it means that I need to start at DTSTART of the event (to get
correct times) and move through all those 16 years until I get to the
year 2016. That is, roughly, 848 (=16*53) calls
of icalrecur_iterator_next().
There might be a way to not count it iteratively.
I know it's a high mathematics. The above example is oversimplified
(especially when you consider the RSCALE), but it would be a nice
performance improvement if one would be able to give some function a
DTSTART, an RRULE and a DATE and the function would return the nearest
start date since the DATE, which is in the RRULE generation chain,
without iterating with icalrecur_iterator_next().
What do you think?
Bye,
Milan
More information about the libical-devel
mailing list