class Enumdate::DateEnumerator::YearlyByDay
Enumerate yealy dates by day like: Apr 4th Tue
Public Class Methods
new(first_date:, month:, nth:, wday:, interval: 1)
click to toggle source
Calls superclass method
Enumdate::DateEnumerator::Base::new
# File lib/enumdate/date_enumerator.rb, line 109 def initialize(first_date:, month:, nth:, wday:, interval: 1) super(first_date: first_date, interval: interval) @month, @nth, @wday = month, nth, wday end
Private Instance Methods
frame_manager()
click to toggle source
# File lib/enumdate/date_enumerator.rb, line 116 def frame_manager DateFrame::Yearly end
occurrence_in_frame(date)
click to toggle source
# File lib/enumdate/date_enumerator.rb, line 120 def occurrence_in_frame(date) make_date_by_day(year: date.year, month: @month, nth: @nth, wday: @wday) rescue ArgumentError nil end