class Chronic::RepeaterMonthName
def next(pointer)
def next(pointer) super unless @current_month_begin case pointer when :future if @now.month < index @current_month_begin = Chronic.construct(@now.year, index) elsif @now.month > index @current_month_begin = Chronic.construct(@now.year + 1, index) end when :none if @now.month <= index @current_month_begin = Chronic.construct(@now.year, index) elsif @now.month > index @current_month_begin = Chronic.construct(@now.year + 1, index) end when :past if @now.month >= index @current_month_begin = Chronic.construct(@now.year, index) elsif @now.month < index @current_month_begin = Chronic.construct(@now.year - 1, index) end end @current_month_begin || raise("Current month should be set by now") else case pointer when :future @current_month_begin = Chronic.construct(@current_month_begin.year + 1, @current_month_begin.month) when :past @current_month_begin = Chronic.construct(@current_month_begin.year - 1, @current_month_begin.month) end end cur_month_year = @current_month_begin.year cur_month_month = @current_month_begin.month if cur_month_month == 12 next_month_year = cur_month_year + 1 next_month_month = 1 else next_month_year = cur_month_year next_month_month = cur_month_month + 1 end Span.new(@current_month_begin, Chronic.construct(next_month_year, next_month_month)) end