-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support parse when start dates are in the past
Prior to this change, Tickle would throw an error if the start option passed in was in the past with respect to `Date.today`. When attempting to enumerate intervals of dates that have already occurred (in the case of looking backwards in a calendar), it is important to be able to parse Tickle expressions and determine what the next occurrence _was_ as opposed to when it _will be_. While it appears that the parse API already supports a `:now` option, it seems this option is ignored when checking this condition and, instead, a `Date.today` is used. This change simply uses the `:now` as is passed to the `Tickled` object to validate `start_date`. Since `Tickled#now` defaults to `Time.now`, this change is minimal but does add value to the gem. References: #4
- Loading branch information
Antonio MalvaGomes
committed
Oct 11, 2017
1 parent
9d3b68f
commit a57dccb
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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