It's a very interesting and feature-rich library. I had a few observations about things I tried that didn't give me the expected result:
"315p" - Returns the time correctly, but on today's date. I wonder if there would be a way to return only the time? (Same for a time range like "10a to 2p", which would return a start and end time). Maybe this comes with a flag and uses the Epoch date (so the date value is 0)?
"31530p" or "3:15:30p" (with or without dates) - The first example fails, the second works, but ignores the seconds.
"12/10 through 12/15" (works fine), but "12/10 through 1/20" fails with "end can't be greater than start"; I would think that when a "range" is detected, the default year could be automatically incremented if the result of using the same year results in this issue.
Sherlock tries its best to handle ambiguous inputs and fill in the missing fields. For example, if you write “December 13” it would assume the year is 2019. By the same logic, when a date isn’t given, Sherlock assumes today’s date. If your application only cares about the time, you can just ignore the date components from the response or zero them out with a Watson post-processor.
Is that a common format for entering time? I suppose I could add support for hh:mm:ss format, but never really seen anyone type that out.
You’re right, this is definitely a missing feature. Will fix.
Multiple language support is tough. It’s not just about translating strings. Other languages have different grammars and formats, so even if somebody submits a PR for another language, I have no way to maintain it.
It's a very interesting and feature-rich library. I had a few observations about things I tried that didn't give me the expected result: