mojombo / chronic

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

Parsing 'next friday' for the first of November returns a Saturday #318

Closed MrLeebo closed 5 years ago

MrLeebo commented 8 years ago
Chronic.parse('next friday', now: Date.new(2015, 11)).to_date
=> Sat, 07 Nov 2015

I expected Fri, 06 Nov 2015. Am I missing something?

andrewhavens commented 8 years ago

Sounds like a timezone issue. When setting now you didn't specify a time zone, so I think it defaults to UTC. I bet it returned a date relative to your current time zone.