mojombo / chronic

Chronic is a pure Ruby natural language date parser.
http://injekt.github.com/chronic
MIT License
3.23k stars 452 forks source link

Bug/Exception: NoMethodError: undefined method `begin' for nil:NilClass #380

Open bragboy opened 6 years ago

bragboy commented 6 years ago

This works

Chronic.parse("five years after today")
=> 2023-07-02 17:30:00 +0200

However this does not!

Chronic.parse("five years after 11 May 2017")
NoMethodError: undefined method `begin' for nil:NilClass
from /.../chronic-0.10.2/lib/chronic/repeaters/repeater_year.rb:48:in `offset'

I am fine if it returns nil, but not an exception

davispuh commented 6 years ago

It's fixed/works in my rewrite branch.