mojombo / chronic

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

Wrong time when parsing "today at midday" #369

Closed clari182 closed 6 years ago

clari182 commented 7 years ago

I am using Chronic to parse Date entities from LUIS in a chatbot.

When a user sends "today at midday" Chronic parses it as 12:00AM instead of 12:00PM.

Chronic.Parser parser = new Chronic.Parser();
var dateResult = parser.Parse(dateEntity.Entity);

dateResult is {(11/14/2017 12:00:00 AM - 11/15/2017 12:00:00 AM)}

Thanks!

davispuh commented 7 years ago

That's because version you use doesn't have midday support, it's only implemented in master branch where it does work correctly.