seejohnrun/ice_cube — Issue #52: Weekly Rule
Author: Tomdarkness
Created: 2011-12-19 19:14:49+00:00
State: open

Hello,

I'm using ice_cube with RoR but I can't seem to get weekly rules to work. I've stripped out all the user input and hard coded the inputs and here is the code:

``` ruby
rule_inst = IceCube::Rule.weekly(1).day(4)
st = DateTime.new(2011,12,1,18,0,0)
fin = DateTime.new(2012,1,19,18,0,0)
schedule = IceCube::Schedule.new(st, :end_time => fin)
schedule.add_recurrence_rule rule_inst

occurrences = schedule.all_occurrences
```

But occurrences only gets filled with an array of 1 element pointing to the time/date for the start time. What I would expect is the dates of every Thursday between the start and end date.