class Chronic::RepeaterWeek

def this(pointer = :future)

def this(pointer = :future)
  super
  case pointer
  when :future
    this_week_start = Chronic.time_class.local(@now.year, @now.month, @now.day, @now.hour) + RepeaterHour::HOUR_SECONDS
    sunday_repeater = RepeaterDayName.new(:sunday)
    sunday_repeater.start = @now
    this_sunday_span = sunday_repeater.this(:future)
    this_week_end = this_sunday_span.begin
    Span.new(this_week_start, this_week_end)
  when :past
    this_week_end = Chronic.time_class.local(@now.year, @now.month, @now.day, @now.hour)
    sunday_repeater = RepeaterDayName.new(:sunday)
    sunday_repeater.start = @now
    last_sunday_span = sunday_repeater.next(:past)
    this_week_start = last_sunday_span.begin
    Span.new(this_week_start, this_week_end)
  when :none
    sunday_repeater = RepeaterDayName.new(:sunday)
    sunday_repeater.start = @now
    last_sunday_span = sunday_repeater.next(:past)
    this_week_start = last_sunday_span.begin
    Span.new(this_week_start, this_week_start + WEEK_SECONDS)
  end
end