Parent

Files

Class/Module Index [+]

Quicksearch

MiniDate

Attributes

day[RW]
month[RW]

Public Class Methods

new(month, day) click to toggle source
# File lib/chronic/repeaters/repeater_season.rb, line 28
def initialize(month, day)
  @month = month
  @day = day
end

Public Instance Methods

equals?(other) click to toggle source
# File lib/chronic/repeaters/repeater_season.rb, line 46
def equals?(other)
  @month == other.month and day == other.day
end
is_between?(md_start, md_end) click to toggle source
# File lib/chronic/repeaters/repeater_season.rb, line 33
def is_between?(md_start, md_end)
  return true if (@month == md_start.month and @day >= md_start.day) ||
                 (@month == md_end.month and @day <= md_end.day)

  i = md_start.month + 1
  until i == md_end.month
    return true if @month == i
    i = (i+1) % 12
  end

  return false
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.