rrule
rrule copied to clipboard
rule.toText() to respect BYSETPOS
Reporting an issue
Thank you for taking an interest in rrule
! Please include the following in
your report:
- [x] Verify that you've looked through existing issues for duplicates before creating a new one Edit: later i found #75
- [x] Code sample reproducing the issue. Be sure to include all input values you are using such as the exact RRule string and dates.
- [x] Expected output
RRULE:FREQ=MONTHLY;INTERVAL=1;WKST=MO;BYDAY=SU;BYSETPOS=2
--> every month on the second SundayRRULE:FREQ=MONTHLY;INTERVAL=1;WKST=MO;BYDAY=SU;BYSETPOS=-1
--> every month on the last Sunday
(Google Calendar) - [x] Actual output
RRULE:FREQ=MONTHLY;INTERVAL=1;WKST=MO;BYDAY=SU;BYSETPOS=2
--> every month on SundayRRULE:FREQ=MONTHLY;INTERVAL=1;WKST=MO;BYDAY=SU;BYSETPOS=-1
--> every month on Sunday
- [x] The version of
rrule
you are using Online http://jakubroztocil.github.io/rrule/ --> I guess that islatest
- [x] Your operating system Chrome Version 88.0.4322.0 (Official Build) canary (x86_64) on MacOSX
- [x] Your local timezone (run
$ date
from the command line of the machine showing the bug)CET
(Central European Time)
Any news on this item ?
+1 Quote from the Docs: "For example, with RRule.MONTHLY, or with RRule.YEARLY and BYMONTH, using RRule.FR.nth(+1) or RRule.FR.nth(-1) in byweekday will specify the first or last friday of the month where the recurrence happens."
If set up in this way, the toText() returns the correct string (e.g. "Every fourth [..]", "Last Friday every [...]"). But this is really uncomfortable to implement, also it's definitely not the expected behavior...