[caldeveloper-l] SKIP in RRULEs

Neil Jenkins neilj at fastmailteam.com
Thu Oct 18 21:23:16 PDT 2018


Hi everyone, 
 
I'm trying to extend the JSCalendar recurrence rule expansion algorithm <https://tools.ietf.org/html/draft-ietf-calext-jscalendar-08#section-4.3.1> to accommodate RFC7529 <https://tools.ietf.org/html/rfc7529#section-4.1> and support RSCALE and SKIP. The former is easy, the latter seems to be a real pain. One big problem I'm running into is that the RFC seems to be quite under-specified when it comes to any kind of edge cases. So, can anyone help answer a few questions (presume `DTSTART=20010201` for all of these): 
 
 1. What happens if I generate duplicates due to SKIP; should they be removed, or considered separate occurrences? e.g. `RSCALE=GREGORIAN;FREQ=YEARLY;BYMONTH=2,3;BYMONTHDAY=1,31;SKIP=FORWARD`. I presume that should not generate two instances of 2001-03-01 despite this being the result of `BYMONTH=2;BYMONTHDAY=31;SKIP=FORWARD` as well as `BYMONTH=3;BYMONTHDAY=1`. 
 2. What about if the duplicates occur in different periods, e.g. `RSCALE=GREGORIAN;FREQ=MONTHLY;BYMONTHDAY=1,31;SKIP=FORWARD` – should they still be removed? 
 3. How does this interact with `BYSETPOS`? Are the duplicates removed before or after applying this? For example, `RSCALE=GREGORIAN;FREQ=MONTHLY;BYMONTHDAY=1,30,31;BYSETPOS=1,2;SKIP=FORWARD` – this might evaluate to 2001-02-01, 2001-02-30, 2001-02-31. We apply bySetPos and dedup (in either order) and get 2001-02-01, 2001-03-01. OK, now we continue to March. is 2001-03-01 considered for part of the `BYSETPOS` (so you get just 2001-03-30)? Or because it's already been generated from the Feb candidates due to the SKIP rule, is it eliminated before applying `BYSETPOS` (so you get 2001-03-30 and 2001-03-31)? 
 
Looking forward to being enlightened on this, 
 
Neil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.calconnect.org/pipermail/caldeveloper-l-calconnect.org/attachments/20181019/c54fc732/attachment.html>


More information about the caldeveloper-l mailing list