lib/chronic/repeaters/repeater_minute.rb in chronic-0.5.0 vs lib/chronic/repeaters/repeater_minute.rb in chronic-0.6.0
- old
+ new
@@ -10,13 +10,13 @@
super
if !@current_minute_start
case pointer
when :future
- @current_minute_start = Time.construct(@now.year, @now.month, @now.day, @now.hour, @now.min + 1)
+ @current_minute_start = Chronic.construct(@now.year, @now.month, @now.day, @now.hour, @now.min + 1)
when :past
- @current_minute_start = Time.construct(@now.year, @now.month, @now.day, @now.hour, @now.min - 1)
+ @current_minute_start = Chronic.construct(@now.year, @now.month, @now.day, @now.hour, @now.min - 1)
end
else
direction = pointer == :future ? 1 : -1
@current_minute_start += direction * MINUTE_SECONDS
end
@@ -28,16 +28,16 @@
super
case pointer
when :future
minute_begin = @now
- minute_end = Time.construct(@now.year, @now.month, @now.day, @now.hour, @now.min)
+ minute_end = Chronic.construct(@now.year, @now.month, @now.day, @now.hour, @now.min)
when :past
- minute_begin = Time.construct(@now.year, @now.month, @now.day, @now.hour, @now.min)
+ minute_begin = Chronic.construct(@now.year, @now.month, @now.day, @now.hour, @now.min)
minute_end = @now
when :none
- minute_begin = Time.construct(@now.year, @now.month, @now.day, @now.hour, @now.min)
- minute_end = Time.construct(@now.year, @now.month, @now.day, @now.hour, @now.min) + MINUTE_SECONDS
+ minute_begin = Chronic.construct(@now.year, @now.month, @now.day, @now.hour, @now.min)
+ minute_end = Chronic.construct(@now.year, @now.month, @now.day, @now.hour, @now.min) + MINUTE_SECONDS
end
Span.new(minute_begin, minute_end)
end
\ No newline at end of file