Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chronic.parse "1 year, 7 months ago" breaks #415

Open
bendangelo opened this issue Nov 14, 2023 · 2 comments
Open

Chronic.parse "1 year, 7 months ago" breaks #415

bendangelo opened this issue Nov 14, 2023 · 2 comments

Comments

@bendangelo
Copy link

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'
@sriram0601
Copy link

sriram0601 commented Nov 25, 2023

This discussion may helps you #338, or what is your expected result?

@bendangelo
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants