<!DOCTYPE html><html><head><title></title><style type="text/css">#fastmail-quoted p.fastmail-quoted-MsoNormal,#fastmail-quoted  p.fastmail-quoted-MsoNoSpacing{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}

p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Fri, 19 Oct 2018, at 7:38 PM, Marten Gajda wrote:<br></div><blockquote type="cite"><div>IMO duplicate instances … You merge
      them into one. … This should answer 1 and 2.<br></div></blockquote><div><br></div><div>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.<br></div><div><br></div><blockquote type="cite"><p>Regarding 3, see the table on page 7
      (<a href="https://tools.ietf.org/html/rfc7529#page-7" class="fastmail-quoted-moz-txt-link-freetext">https://tools.ietf.org/html/rfc7529#page-7</a>) …<br></p><p>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.<br></p></blockquote><div><br></div><div>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.<br></div><div><br></div><div><code style="border-radius:3px;border:1px solid #ccc;padding:1px 3px;background:#f6f6f6;font-family:menlo,consolas,monospace;font-size:90%;">DTSTART=20010201</code><br></div><div><code style="border-radius:3px;border:1px solid #ccc;padding:1px 3px;background:#f6f6f6;font-family:menlo,consolas,monospace;font-size:90%;">RSCALE=GREGORIAN;FREQ=MONTHLY;BYMONTHDAY=1,30,31;BYSETPOS=1,2;SKIP=FORWARD</code><br></div><div><br></div><div><b>Interpretation 1 (dedup after BYSETPOS):</b><br></div><ol><li>Iterate: 2001-02-01, 2001-02-30, 2001-02-31.<br></li><li>Apply SKIP: 2001-02-01, 2001-03-01, 2001-03-01.<br></li><li>Apply BYSETPOS: 2001-02-01, 2001-03-01<br></li><li>Dedup: 2001-02-01, 2001-03-01<br></li><li>Iterate: 2001-03-01, 2001-03-30, 2001-03-31.<br></li><li>Apply SKIP: 2001-03-01, 2001-03-30, 2001-03-31.<br></li><li>Apply BYSETPOS: 2001-03-01, 2001-03-30<br></li><li>Dedup: 2001-03-30<br></li></ol><div><br></div><div>Final result: 2001-02-01, 2001-03-01, 2001-03-30, 2001-04-01 …<br></div><div><br></div><div><b>Interpretation 2 (dedup after SKIP):</b><br></div><ol><li>Iterate: 2001-02-01, 2001-02-30, 2001-02-31.<br></li><li>Apply SKIP: 2001-02-01, 2001-03-01, 2001-03-01.<br></li><li>Dedup: 2001-02-01, 2001-03-01<br></li><li>Apply BYSETPOS: 2001-02-01, 2001-03-01<br></li><li>Iterate: 2001-03-01, 2001-03-30, 2001-03-31.<br></li><li>Apply SKIP: 2001-03-01, 2001-03-30, 2001-03-31.<br></li><li>Dedup: 2001-03-30, 2001-03-31<br></li><li>Apply BYSETPOS: 2001-03-30, 2001-03-31<br></li></ol><div><br></div><div>Final result: 2001-02-01, 2001-03-01, 2001-03-30, 2001-03-31 …<br></div><div><br></div><div>--------<br></div><div><br></div><div>I do not believe there is anything in the RFC that indicates which of these (or neither!) is correct.<br></div><div><br></div><div>Neil.<br></div></body></html>