Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/chronic/repeaters/repeater_minute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def this(pointer = :future)
end

def offset(span, amount, pointer)
return nil unless span

direction = pointer == :future ? 1 : -1
span + direction * amount * MINUTE_SECONDS
end
Expand Down
3 changes: 3 additions & 0 deletions test/test_parsing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,9 @@ def test_parse_guess_nonsense

time = parse_now("t")
assert_nil time

time = parse_now("01 Jan 1953 to 31 Dec 1954")
assert_nil time
end

def test_parse_span
Expand Down