We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm not sure what's going one here, but it doesn't seem like next_occurrences is obeying this recurring rule logic:
next_occurrences
hash = {"validations"=>{"day"=>[]}, "rule_type"=>"IceCube::WeeklyRule", "interval"=>2, "until"=>nil, "count"=>nil}
So I turn the hash into an IceCube rule...
$ rule = IceCube::Rule.from_hash hash => #<IceCube::WeeklyRule:0x007fb4b5bb39f8 @interval=2, @uses=0, @validations= {:interval=>[#<IceCube::Validations::WeeklyInterval::Validation:0x007fb4b5bb31b0 @interval=2, @week_start=:sunday>], :base_hour=>[#<IceCube::Validations::ScheduleLock::Validation:0x007fb4b5bb3750 @type=:hour>], :base_min=>[#<IceCube::Validations::ScheduleLock::Validation:0x007fb4b5bb36b0 @type=:min>], :base_sec=>[#<IceCube::Validations::ScheduleLock::Validation:0x007fb4b5bb3610 @type=:sec>]}, @week_start=:sunday>
Then I create a schedule...
$ sched = IceCube::Schedule.new Date.today => #<IceCube::Schedule:0x007fb4b7214a80 @all_exception_rules=[], @all_recurrence_rules=[], @start_time=2015-02-13 00:00:00 -0600>
Add the rule
$ sched.add_recurrence_rule rule => [#<IceCube::WeeklyRule:0x007fb4b5bb39f8 @interval=2, @uses=0, @validations= {:interval=>[#<IceCube::Validations::WeeklyInterval::Validation:0x007fb4b5bb31b0 @interval=2, @week_start=:sunday>], :base_hour=>[#<IceCube::Validations::ScheduleLock::Validation:0x007fb4b5bb3750 @type=:hour>], :base_min=>[#<IceCube::Validations::ScheduleLock::Validation:0x007fb4b5bb36b0 @type=:min>], :base_sec=>[#<IceCube::Validations::ScheduleLock::Validation:0x007fb4b5bb3610 @type=:sec>]}, @week_start=:sunday>]
And inspect the next 20 occurrences
$ sched.next_occurrences 20 => [Sat, 14 Feb 2015 00:00:00 UTC +00:00, Sun, 22 Feb 2015 00:00:00 UTC +00:00, Mon, 23 Feb 2015 00:00:00 UTC +00:00, Tue, 24 Feb 2015 00:00:00 UTC +00:00, Wed, 25 Feb 2015 00:00:00 UTC +00:00, Thu, 26 Feb 2015 00:00:00 UTC +00:00, Fri, 27 Feb 2015 00:00:00 UTC +00:00, Sat, 28 Feb 2015 00:00:00 UTC +00:00, Sun, 08 Mar 2015 00:00:00 UTC +00:00, Mon, 09 Mar 2015 00:00:00 UTC +00:00, Tue, 10 Mar 2015 00:00:00 UTC +00:00, Wed, 11 Mar 2015 00:00:00 UTC +00:00, Thu, 12 Mar 2015 00:00:00 UTC +00:00, Fri, 13 Mar 2015 00:00:00 UTC +00:00, Sat, 14 Mar 2015 00:00:00 UTC +00:00, Sun, 22 Mar 2015 00:00:00 UTC +00:00, Mon, 23 Mar 2015 00:00:00 UTC +00:00, Tue, 24 Mar 2015 00:00:00 UTC +00:00, Wed, 25 Mar 2015 00:00:00 UTC +00:00, Thu, 26 Mar 2015 00:00:00 UTC +00:00]
What am I missing here?
What does it show a week of consecutive days?
The text was updated successfully, but these errors were encountered:
Late reply, I know. Sorry, I'm just getting back to this project again.
That. Is. Weird. It looks like the rule from hash is missing a :base_wday validation. We should fix that.
:base_wday
Sorry, something went wrong.
@avit I haven't looked enough at the internals to know what's going on.
I'm happy to contribute in fixing this, but I don't even know where to start.
Can you maybe give me some direction?
Skip removing validations if none are added
aed3233
Fixes ice-cube-ruby#281
e080ca2
No branches or pull requests
I'm not sure what's going one here, but it doesn't seem like
next_occurrences
is obeying this recurring rule logic:So I turn the hash into an IceCube rule...
Then I create a schedule...
Add the rule
And inspect the next 20 occurrences
What am I missing here?
What does it show a week of consecutive days?
The text was updated successfully, but these errors were encountered: