class Mhc::DateEnumerator::MonthlyByDay
Enumerate monthly dates by day like: 4th Tue
Public Class Methods
new(start_date:, end_date:, interval: 1, nth:, wday:)
click to toggle source
Calls superclass method
Mhc::DateEnumerator::Base::new
# File lib/mhc/date_enumerator.rb, line 172 def initialize(start_date:, end_date:, interval: 1, nth:, wday:) super(start_date: start_date, end_date: end_date, interval: interval) @nth, @wday = nth, wday end
Private Instance Methods
frame_manager()
click to toggle source
# File lib/mhc/date_enumerator.rb, line 179 def frame_manager DateFrame::Monthly end
occurrence_in_frame(date)
click to toggle source
# File lib/mhc/date_enumerator.rb, line 183 def occurrence_in_frame(date) make_date_by_day(year: date.year, month: date.month, nth: @nth, wday: @wday) rescue nil end