-
Notifications
You must be signed in to change notification settings - Fork 247
Fix GetOccurrences(periodStart) to return still active occurrences
#836
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
Conversation
|
@ical-org/maintainers Not sure it is the best idea to make the behavior configurable, as it introduces additional complexities, requires additional testing, etc. Please let me know what you think. If someone would find the time, the PR would also deserve additional tests related to occurrences that should be returned and cross a DST change before |
75fdf91 to
2706999
Compare
|
@ical-org/maintainers formally the changes are breaking, at least due to classes becoming abstract. However, effectively those are not intended for being constructed/inherited by user code, so I'd consider this acceptable. |
|
Thanks! Few first comments:
[Edit]
Agree, should we then consequently disallow construction inheritance by user code? |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
2706999 to
69dcbc4
Compare
Agree, so I removed the last commit. Introduced the configuration because I don't like the behavior of filtering by the end time too much because the other way is simpler and easier to understand. Anyhow, the configuration adds even more complexity. |
…rted in the past, even if still active
…s, even if they started in the past
69dcbc4 to
29d19e4
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks!



See #825: According to existing code,
GetOccurrences(periodStart)seems to be intended to return not only those recurrences that start at or afterperiodStart, but also those still active at that date-time. There's has been some discussion in #825 about whether to follow the original intention or rather just return those that start at or afterperiodStart.This PR introduces a new evaluation option that allows to control the intended behavior. By default only those are returned that start at or after
periodStart. By setting the new optionEvaluationOptions.IncludeStillActiveOccurrences, also those are returned that started in the past but are still active at the given point in time.Fixes #825