class Chronic::RepeaterDayPortion

def next(pointer)

def next(pointer)
  super
  unless @current_span
    now_seconds = @now - Chronic.construct(@now.year, @now.month, @now.day)
    if now_seconds < @range.begin
      case pointer
      when :future
        range_start = Chronic.construct(@now.year, @now.month, @now.day) + @range.begin
      when :past
        range_start = Chronic.construct(@now.year, @now.month, @now.day - 1) + @range.begin
      end
    elsif now_seconds > @range.end
      case pointer
      when :future
        range_start = Chronic.construct(@now.year, @now.month, @now.day + 1) + @range.begin
      when :past
        range_start = Chronic.construct(@now.year, @now.month, @now.day) + @range.begin
      end
    else
      case pointer
      when :future
        range_start = Chronic.construct(@now.year, @now.month, @now.day + 1) + @range.begin
      when :past
        range_start = Chronic.construct(@now.year, @now.month, @now.day - 1) + @range.begin
      end
    end
    offset = (@range.end - @range.begin)
    range_end = construct_date_from_reference_and_offset(range_start, offset)
    @current_span = Span.new(range_start, range_end)
  else
    days_to_shift_window =
    case pointer
    when :future
      1
    when :past
      -1
    end
    new_begin = Chronic.construct(@current_span.begin.year, @current_span.begin.month, @current_span.begin.day + days_to_shift_window, @current_span.begin.hour, @current_span.begin.min, @current_span.begin.sec)
    new_end = Chronic.construct(@current_span.end.year, @current_span.end.month, @current_span.end.day + days_to_shift_window, @current_span.end.hour, @current_span.end.min, @current_span.end.sec)
    @current_span = Span.new(new_begin, new_end)
  end
end