-
Notifications
You must be signed in to change notification settings - Fork 247
Evaluation: Remove periodEnd param from GetOccurrences et al
#781
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
09c0e8a to
de8ba14
Compare
Codecov ReportAttention: Patch coverage is ❌ Your project status has failed because the head coverage (66%) is below the target coverage (80%). You can increase the head coverage or adjust the target coverage. @@ Coverage Diff @@
## main #781 +/- ##
===================================
Coverage 66% 66%
===================================
Files 105 105
Lines 4438 4431 -7
Branches 1115 1113 -2
===================================
- Hits 2912 2910 -2
+ Misses 1062 1058 -4
+ Partials 464 463 -1
🚀 New features to boost your workflow:
|
de8ba14 to
774f1b8
Compare
| p.StartTime.GreaterThanOrEqual(periodStart) | ||
| || endTime.GreaterThan(periodStart) | ||
| select p; | ||
| } |
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.
much more simple
axunonb
left a comment
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.
Significantly improves usability and removes ambiguities - thanks a lot!
|
I'll publish a new pre-release after this PR is merged, okay? |
…s()` and `Evaluate()`
774f1b8 to
f141c0f
Compare
Sounds great. Whatever you think. |
|
Maybe change the parameter name as suggested by Sonar |
…enceDate` to be consistent with the interface, as suggested by sonar
|
axunonb
left a comment
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.
Excellent!
@axunonb Do you think it would be a good time for the next pre-release? Would appreciate having a version with the culture bug fixed. |
I'll try to make it over the next 24 hours. |



Remove the
periodEndparam fromCalendar.GetOccurrences(),IEvaluator.Evaluate()et al, which was used for specifying an upper bound when returning occurrences. Since #665 the returned sequence is a generator and only generates the results as it is iterated. Hence an upper bound can easily be implemented usingEnumerable.TakeWhile()or the like.The exact behavior of the param was not exactly easy to understand. It was often unclear, whether it is considered inclusive or exclusive (compare #740), there was special handling for the case
periodStart==periodEnd, etc., which is removed with this PR and therefore significantly simplifies the interface and reduces complexity.