neilgupta / Sherlock

Natural-language event parser for Javascript
https://sherlock.neil.gg
MIT License
532 stars 32 forks source link

Parsing time ranges can be unreliable in some cases #7

Closed neilgupta closed 9 years ago

neilgupta commented 11 years ago

If the user enters 'today 3 - 5,' Sherlock interprets that as March 29 - April 5, instead of March 29, 3pm - 5pm. 'today at 3 - 5' is parsed fine.

The easiest way to fix this is to parse digits directly before or after a relative date phrase (today, in 3 days, etc) as an hour indicator.