Skip to content

Conversation

mjsir911
Copy link

Fixes #436


Thanks for contributing to rrule!

To submit a pull request, please verify that you have done the following:

  • Merged in or rebased on the latest master commit
  • Linked to an existing bug or issue describing the bug or feature you're
    addressing
  • Written one or more tests showing that your change works as advertised

Comment on lines +99 to +101
: bysetpos.flatMap((n) =>
byweekday.map((weekday: Weekday) => weekday.nth(n))
)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's probably important to note that this is not compliant with the BYSETPOS spec but is good enough, BYSETPOS specifying that it specifies constraints to the "nth" possible option every iteration, so this would be wrong when including multiple weekdays since it's not taking to account that multiple weekdays happen.

@ggaabe
Copy link

ggaabe commented Jul 15, 2025

Hi, you may want to look at rrule-temporal, it has full RFC-5545 and toText support:

https://github.com/ggaabe/rrule-temporal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rule.toText() to respect BYSETPOS
2 participants