chronic
chronic copied to clipboard
Chronic.parse "1 year, 7 months ago" breaks
Running that line gives this error:
[6] pry(main)> Chronic.parse "1 year, 7 months ago"
NoMethodError: undefined method `start=' for nil:NilClass
from /Users/ben/.rvm/gems/ruby-3.2.2/gems/chronic-0.10.2/lib/chronic/handlers.rb:517:in `get_anchor'
This discussion may helps you #338, or what is your expected result?
Hi, thanks. I would expect something like this as the output:
Time.current - ChronicDuration.parse("1 year, 7 months ago")
Or at the very least it doesn't throw an error.