You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mon, 02 Nov 2009 07:00:00 EST -05:00,
Tue, 03 Nov 2009 07:00:00 EST -05:00,
Mon, 23 Nov 2009 07:00:00 EST -05:00,
Tue, 24 Nov 2009 07:00:00 EST -05:00,
Mon, 14 Dec 2009 07:00:00 EST -05:00,
Tue, 15 Dec 2009 07:00:00 EST -05:00,
Mon, 04 Jan 2010 07:00:00 EST -05:00,
Tue, 05 Jan 2010 07:00:00 EST -05:00,
etc
However calling .next_occurrences(3, Time.utc(2009, 12, 28, 12)) on the schedule yields
[0] Tue, 29 Dec 2009 07:00:00 EST -05:00,
[1] Mon, 04 Jan 2010 07:00:00 EST -05:00,
[2] Tue, 05 Jan 2010 07:00:00 EST -05:00
Notice the schedule erroneously indicates it will occur on Tue, 29 Dec in this case.
The text was updated successfully, but these errors were encountered:
I corrected some issues surrounding weekly intervals, specifically around the first occurrences getting missed based on the start time not being aligned to the start of the week.
November 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
It looks like you are requesting the next 3 occurrences from a time before the start time. That should not be possible, and I'm guessing the alignment is thrown off... Based on your rule, weekday 1 and 2 should be Monday 2nd and Tuesday 3rd just as you expect.
I'll have a look and get a fixed release out soon, with a test for this scenario. Thanks for the report!
Hi, after upgrading to 0.16.0 from 0.15.0 some failures have been introduced to unit tests for the module that we have used ice_cube for.
Ruby version: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
Given the following IceCube::Schedule:
{ :start_time => { :time => 2009-11-02 12:00:00 UTC, :zone => "America/Montreal" }, :end_time => { :time => 2009-11-02 13:15:00 UTC, :zone => "America/Montreal" }, :rrules => [ [0] { :validations => { :day => [ [0] 1, [1] 2 ] }, :rule_type => "IceCube::WeeklyRule", :interval => 3, :week_start => 0 } ], :rtimes => [], :extimes => [] }
The schedule should occur on
Mon, 02 Nov 2009 07:00:00 EST -05:00,
Tue, 03 Nov 2009 07:00:00 EST -05:00,
Mon, 23 Nov 2009 07:00:00 EST -05:00,
Tue, 24 Nov 2009 07:00:00 EST -05:00,
Mon, 14 Dec 2009 07:00:00 EST -05:00,
Tue, 15 Dec 2009 07:00:00 EST -05:00,
Mon, 04 Jan 2010 07:00:00 EST -05:00,
Tue, 05 Jan 2010 07:00:00 EST -05:00,
etc
However calling .next_occurrences(3, Time.utc(2009, 12, 28, 12)) on the schedule yields
[0] Tue, 29 Dec 2009 07:00:00 EST -05:00,
[1] Mon, 04 Jan 2010 07:00:00 EST -05:00,
[2] Tue, 05 Jan 2010 07:00:00 EST -05:00
Notice the schedule erroneously indicates it will occur on Tue, 29 Dec in this case.
The text was updated successfully, but these errors were encountered: