-
Notifications
You must be signed in to change notification settings - Fork 360
Support BYSETPOS for MONTHLY AND YEARLY freq #349
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
Interesting! This option doesn't seem to be clearly documented in the icalendar RFC but it looks like it's widely supported by different tools. I believe it would be worth finishing this up and adding it. |
nehresma
added a commit
to nehresma/ice_cube
that referenced
this pull request
Jul 30, 2018
A few small updates to Nicolas Marlier's BYSETPOS support added in PR ice-cube-ruby#349
joshbeckman
added a commit
to officeluv/ice_cube
that referenced
this pull request
Feb 5, 2019
In August 2016, @NicolasMarlier added BYSETPOS support (ice-cube-ruby#349). Then, in July 2018, @nehresma added a few small changes to run in modern Ruby and a more modern rspec (ice-cube-ruby#449). Then, in January 2019, @davidstosik and @k3rni suggested changes to reduce complexity. This incorporates all the above into a single diff.
davidstosik
pushed a commit
to davidstosik/ice_cube
that referenced
this pull request
Feb 6, 2019
A few small updates to Nicolas Marlier's BYSETPOS support added in PR ice-cube-ruby#349
nehresma
added a commit
to nehresma/ice_cube
that referenced
this pull request
Dec 12, 2022
A few small updates to Nicolas Marlier's BYSETPOS support added in PR ice-cube-ruby#349
afrase
pushed a commit
to sessions-inc/ice_cube
that referenced
this pull request
Feb 12, 2025
A few small updates to Nicolas Marlier's BYSETPOS support added in PR ice-cube-ruby#349
nehresma
added a commit
to nehresma/ice_cube
that referenced
this pull request
Dec 20, 2025
A few small updates to Nicolas Marlier's BYSETPOS support added in PR ice-cube-ruby#349
pacso
added a commit
that referenced
this pull request
Jan 19, 2026
* Support BYSETPOS for MONTHLY AND YEARLY freq * Modernize BYSETPOS commit A few small updates to Nicolas Marlier's BYSETPOS support added in PR #349 * address the spec DST sensitivity in .to_yaml round trips * update PR from feedback rebased against master -- its been 4 years * excluding until, not util * remove no longer needed TimeUtil active_support require This was a holdover from the original PR back in 2016. TimeUtil has since been refactored to not need this, but the require was inadvertently left. * fix interval use with bysetpos * remove unneeded use of activesupport for date arithmetic * support for bysetpos with freq=weekly * support for parsing rrules from ical that are very long and wrap * dont require the wrapped line to be the last the ical string * nitpick fixes - use map and double quotes for consistency * do not rely on ActiveSupport-only helper methods * fix BYSETPOS serialization * fix SETBYPOS with non BYDAY expansions * expand BYSETPOS spec coverage - weekly: positive/multi/mixed positions, BYHOUR expansion - monthly: negative positions, BYMONTHDAY, BYMINUTE - yearly: multiple positive/negative positions * adding BYSETPOS validations for daily/hourly/minutely * add verification that bysetpos runs after other byXXX filters * BYSETPOS interval boundaries specs * dd BYSETPOS ordering specs * add BYSETPOS anchor and interval specs * refactor and create BYSETPOS helper for interval bounds * adding more comprehensive BYSETPOS specs This covers repeated values, out-of-range, and UNTIL cases * updating readme with bysetpos support * adding BYSETPOS to_ical spec coverage * adding SECONDLY BYSETPOS support and specs * adding BYYEARDAY BYSETPOS specs * Gemfile adjustments for Ruby stdlib changes * adding support for more versions of ActiveSupport * Fix BYSETPOS to count positions from interval start per RFC 5545 BYSETPOS was anchoring candidate enumeration to DTSTART instead of the interval boundary, causing positions to be miscounted. This skipped the first occurrence when DTSTART itself matched a BYSETPOS position (e.g., starting on the 2nd Tuesday when selecting BYSETPOS=2). The fix anchors the temporary schedule to the interval start based on which BYxxx components expand the candidate set (day, month, hour, etc.). * Fix flaky YAML round-trip test that failed across DST boundaries Use UTC instead of Time.now to avoid DST offset mismatches when YAML serialization loses timezone info and preserves only the numeric offset. * linting fixes * CHANGELOG entry * Fix lint errors * Add missing round-trip YAML tests for BYSETPOS * Create time objects correctly * Add edge cases for BYSETPOS --------- Co-authored-by: Nicolas Marlier <nicolas@juliedesk.com> Co-authored-by: Jon Pascoe <jon.pascoe@me.com>
Collaborator
|
I believe this was implemented in #449 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Self-explanatory ;)