Closed danjford closed 8 years ago
Possible fix, change patterns.explicitTime
from:
/(?:@ ?)?\b(?:at |from )?(1[0-2]|[1-9])(?::?([0-5]\d))? ?([ap]\.?m?\.?)?(?:o'clock)?\b/
To:
/(?:@ ?)?\b(?:at |from )?([0-2]?[1-9])(?::?([0-5]\d))? ?([ap]\.?m?\.?)?(?:o'clock)?\b/
This is a reasonable solution, but it breaks some of the tests. In particular, supporting "15" like this seems to introduce bugs in the ambiguous date parsing code. "Meeting today at 1500" works as expected, but the short form confuses Sherlock. I agree this should be fixed, but it will likely require a more complex solution or trade off in accuracy for more ambiguous statements.
If you try using a 24 hour time then the time gets set to 00:00:00.
I.e. this works
Meeting today at 3
, but this doesn'tMeeting today at 15