[caldeveloper-l] SKIP in RRULEs

Neil Jenkins neilj at fastmailteam.com
Sun Oct 21 17:27:16 PDT 2018


On Fri, 19 Oct 2018, at 7:38 PM, Marten Gajda wrote: 
> IMO duplicate instances … You merge them into one. … This should answer 1 and 2. 
 
I agree that duplicates are undesirable here and this is probably the right thing to do; I do think the SKIP RFC should have called this out explicitly though. 
 
> Regarding 3, see the table on page 7 (https://tools.ietf.org/html/rfc7529#page-7) … 

> It says that SKIP is applied before BYSETPOS. So In your example 2001-02-30 and 2001-02-31 would both wrap around to 2001-03-01 which becomes the 2nd instance of this particular set (even though it's in the next month), and also happens to be the first instance of the "March Set". So in this case 3 instances are merged into one. 

 
But the issue is not when the SKIP is applied, it's when deduplication happens, which is not mentioned at all in any of the specs. (To be fair, it didn't matter for RFC5545, but it does matter with SKIP.) Let's look at the example again. 
 
`DTSTART=20010201` 
`RSCALE=GREGORIAN;FREQ=MONTHLY;BYMONTHDAY=1,30,31;BYSETPOS=1,2;SKIP=FORWARD` 
 
*Interpretation 1 (dedup after BYSETPOS):* 
 1. Iterate: 2001-02-01, 2001-02-30, 2001-02-31. 
 2. Apply SKIP: 2001-02-01, 2001-03-01, 2001-03-01. 
 3. Apply BYSETPOS: 2001-02-01, 2001-03-01 
 4. Dedup: 2001-02-01, 2001-03-01 
 5. Iterate: 2001-03-01, 2001-03-30, 2001-03-31. 
 6. Apply SKIP: 2001-03-01, 2001-03-30, 2001-03-31. 
 7. Apply BYSETPOS: 2001-03-01, 2001-03-30 
 8. Dedup: 2001-03-30 
 
Final result: 2001-02-01, 2001-03-01, 2001-03-30, 2001-04-01 … 
 
*Interpretation 2 (dedup after SKIP):* 
 1. Iterate: 2001-02-01, 2001-02-30, 2001-02-31. 
 2. Apply SKIP: 2001-02-01, 2001-03-01, 2001-03-01. 
 3. Dedup: 2001-02-01, 2001-03-01 
 4. Apply BYSETPOS: 2001-02-01, 2001-03-01 
 5. Iterate: 2001-03-01, 2001-03-30, 2001-03-31. 
 6. Apply SKIP: 2001-03-01, 2001-03-30, 2001-03-31. 
 7. Dedup: 2001-03-30, 2001-03-31 
 8. Apply BYSETPOS: 2001-03-30, 2001-03-31 
 
Final result: 2001-02-01, 2001-03-01, 2001-03-30, 2001-03-31 … 
 
-------- 
 
I do not believe there is anything in the RFC that indicates which of these (or neither!) is correct. 
 
Neil. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.calconnect.org/pipermail/caldeveloper-l-calconnect.org/attachments/20181021/d046151f/attachment.html>


More information about the caldeveloper-l mailing list