BYSETPOS seems to be supported only for certain frequencies, i.e. for YEARLY and for MONTHLY (see #21) but seemingly not for others.
E.g. the following test case fails:
RRULE:FREQ=HOURLY;BYMINUTE=0,10,20,30,40,50;BYSETPOS=-2,3;INTERVAL=2;COUNT=5
DTSTART:20241023T154000
INSTANCES:20241023T154000,20241023T172000,20241023T174000,20241023T192000,20241023T194000
[Edit] Could also easily get something wrong. The RFC says
Valid values are 1 to 366 or -366 to -1.
This seems to imply that no time-related BY rules may be applied, therefore the above example would be wrong. However, the following example doesn't seem to work either:
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1,3;COUNT=3
DTSTART:20241023
Expected INSTANCES:20241023,20241028,20241030
Actual INSTANCES:20241023,20241024,20241025
BYSETPOSseems to be supported only for certain frequencies, i.e. forYEARLYand forMONTHLY(see #21) but seemingly not for others.E.g. the following test case fails:
[Edit] Could also easily get something wrong. The RFC says
This seems to imply that no time-related BY rules may be applied, therefore the above example would be wrong. However, the following example doesn't seem to work either: