Option to include prior occurrences with overlapping duration#302
Merged
Conversation
Contributor
Author
|
I opted for a simple defaulted option on the schedule methods. It's not as descriptive as what was proposed in this thread but it seemed to fit in with the rest of the code better the way I've done it, and a named param might reduce compatibility with older Rubys? |
Unecessarily setting the start time search back to the start of the schedule for a spanned search, when in fact it simply needs to step back a duration.
The spans checks were incorrectly returning a hit when the end of the duration for an event ended on the same time as the start time checks. Allows occurring_between? method to now be simplifed to use the spanned check.
|
I need this too. It would be great to have it merged.. |
|
@seejohnrun any chance to see this merged? |
Contributor
Author
|
I use it in production too.. And it works great |
Collaborator
|
This is cool! definitely down to merge ie: |
Swapping the new spans parameter for an options hash to make the method calls more specific in their meaning.
Contributor
Author
|
You're right. Much neater. I've updated the PR. Not sure what's going on with the Travis failures. Tests pass ok. Looking forward to the merge. Thanks! |
seejohnrun
added a commit
that referenced
this pull request
Feb 23, 2016
Option to include prior occurrences with overlapping duration
Collaborator
|
Thanks all - will be out as part of 0.14.0 |
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
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.
Adding an option on schedule methods to include occurrences whose duration intersects a time window. Issue #154
#154