Skip to content

Discrepancy in behavior of methods occurring_between? and occurrences_between  #153

@stevschmid

Description

@stevschmid

Events which span over multiple days should be returned by occurrences_between.
occurring_between? behaves as I'd expect.

require 'ice_cube'
require 'time'

schedule = IceCube::Schedule.new(Time.parse('2013-03-04 16:00:00 +00:00'), end_time: Time.parse('2013-03-07 14:00:00 +00:00'))
schedule.add_recurrence_rule IceCube::Rule.weekly

lower_bound = Time.parse('2013-03-05 00:00:00 +00:00')
upper_bound = Time.parse('2013-03-06 00:00:00 +00:00')

schedule.occurring_between?(lower_bound, upper_bound)
# true

schedule.occurrences_between(lower_bound, upper_bound)
# []

ice_cube 0.10.0 / Ruby 1.9.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions