1 class Chronic::RepeaterSecond < Chronic::Repeater #:nodoc:
2 SECOND_SECONDS = 1 # haha, awesome
4 def next(pointer = :future)
7 direction = pointer == :future ? 1 : -1
10 @second_start = @now + (direction * SECOND_SECONDS)
12 @second_start += SECOND_SECONDS * direction
15 Chronic::Span.new(@second_start, @second_start + SECOND_SECONDS)
18 def this(pointer = :future)
21 Chronic::Span.new(@now, @now + 1)
24 def offset(span, amount, pointer)
25 direction = pointer == :future ? 1 : -1
26 span + direction * amount * SECOND_SECONDS