class Enumdate::DateEnumerator::MonthlyByMonthday
Enumerate monthly dates by month-day like: 22
Public Class Methods
new(first_date:, mday:, interval: 1)
click to toggle source
Calls superclass method
Enumdate::DateEnumerator::Base::new
# File lib/enumdate/date_enumerator.rb, line 175 def initialize(first_date:, mday:, interval: 1) super(first_date: first_date, interval: interval) @mday = mday end
Private Instance Methods
frame_manager()
click to toggle source
# File lib/enumdate/date_enumerator.rb, line 182 def frame_manager DateFrame::Monthly end
occurrence_in_frame(date)
click to toggle source
# File lib/enumdate/date_enumerator.rb, line 186 def occurrence_in_frame(date) Date.new(date.year, date.month, @mday) rescue Date::Error nil end