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
Suppose I have a Daily rule which occurs on all days except one day of a week and I invoke occurrences_between, the returned dates are only those till we have the exempted DAY.
require 'rubygems'
require 'ice_cube'
require 'active_support/all'
require 'pp'
include IceCube
schedule = Schedule.new(DateTime.new(2012, 05, 1))
schedule.add_recurrence_rule Rule.daily.day(:sunday, :tuesday, :wednesday, :thursday, :friday, :saturday)
occurrences = schedule.occurrences_between(DateTime.new(2012, 05, 19), DateTime.new(2012, 05, 24))
occurrences.each do |o|
puts 'Occurring on ' + o.to_s
end
The expected output is 19th May, 20th, 22nd, 23rd and 24th. But the actual output is only 19th and 20th. Since 21st is not allowed, the logic inside 'find_occurrences' of schedule.rb will break upon the 'res' being NULL.
For the same reason, invoking schedule.next_occurrence('20th May') will return year 2248 rather than 22nd May.
The text was updated successfully, but these errors were encountered:
Suppose I have a Daily rule which occurs on all days except one day of a week and I invoke occurrences_between, the returned dates are only those till we have the exempted DAY.
The expected output is 19th May, 20th, 22nd, 23rd and 24th. But the actual output is only 19th and 20th. Since 21st is not allowed, the logic inside 'find_occurrences' of schedule.rb will break upon the 'res' being NULL.
For the same reason, invoking schedule.next_occurrence('20th May') will return year 2248 rather than 22nd May.
The text was updated successfully, but these errors were encountered: