-
-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bysetpos with multiple byweekday in monthly recurrence giving unexpected results #375
Comments
Can confirm I'm seeing the same issue in my own implementation. Is the preference that we use the .nth method instead of trying to combine setpost and weekday? |
For anyone else looking here, I worked around this using the .nth method on the weekday constants.
|
@Mattkins where does the .nth() method come from? |
Hopefully I don't lead you on a wild goose chase, it's been a while and we don't work with this library any more. I believe it's on the weekday constants provided by RRule. For example:
|
Yes, I found it. Thank you for replying. May I ask which library you are using instead? |
@tanthammar, we don't do anything with rrule or any repeating dates any more, sorry. |
When the recurrence rule is set for every month on 3rd Monday and Wednesday, the resulting dates are messed up. Attaching a picture from the demo site.
new RRule({
freq: RRule.MONTHLY,
count: 30,
interval: 1,
byweekday: [RRule.MO, RRule.WE],
bysetpos: [3]
})
String: RRULE:FREQ=MONTHLY;COUNT=30;INTERVAL=1;WKST=MO;BYDAY=MO,WE;BYSETPOS=3
But the resulting text and the result are incorrect
rule.toText(): every month on Monday, Wednesday for 30 times
expected rule.toText(): every month on 3rd Monday and Wednesday.
NOTE: bysetpos DOES work with one byweekday but not multiple days array in the demo site.
The text was updated successfully, but these errors were encountered: