class Mhc::DateEnumerator::YearlyByDay

Enumerate yealy dates by day like: Apr 4th Tue

Public Class Methods

new(start_date:, end_date:, interval: 1, month:, nth:, wday:) click to toggle source
Calls superclass method Mhc::DateEnumerator::Base::new
# File lib/mhc/date_enumerator.rb, line 134
def initialize(start_date:, end_date:, interval: 1, month:, nth:, wday:)
  super(start_date: start_date, end_date: end_date, interval: interval)
  @month, @nth, @wday = month, nth, wday
end

Private Instance Methods

frame_manager() click to toggle source
# File lib/mhc/date_enumerator.rb, line 141
def frame_manager
  DateFrame::Yearly
end
occurrence_in_frame(date) click to toggle source
# File lib/mhc/date_enumerator.rb, line 145
def occurrence_in_frame(date)
  make_date_by_day(year: date.year, month: @month, nth: @nth, wday: @wday) rescue nil
end