Sherlock icon indicating copy to clipboard operation
Sherlock copied to clipboard

time system for 24-hour clock as a options

Open roeniss opened this issue 3 years ago • 1 comments

when I typed above, the result was "2020-08-24T23:00:00 ~ 2020-08-25T00:00:00", rather than "2020-08-24T11:00:00 ~ 2020-08-25T12:00:00" which I thought it would.

can we change this stuff? I think 24-hour time system is more intuitive than 11am or full qualified timestamp (ex, 2020-08-24T11:00:00)

(actually this idea came from here : https://github.com/toniov/gcal-cli/issues/15)

roeniss avatar Sep 03 '20 16:09 roeniss

Hi @roeniss, that's a good point! This is a tough one. Sherlock does support 24-hour time when it's not ambiguous. For example interview Mon 14:00 works as expected. However, when there's ambiguity, Sherlock tries to guess what you mean based on the current time. For example, if you typed interview Mon 11:00 at 9am, you would actually get the response you're hoping for. However, if you type it in the afternoon, Sherlock assumes PM since that's the more upcoming time.

Obviously that heuristic isn't fool proof. I'd be open to a pull request that adds an option for weighting 24 hour time over the current logic when dealing with ambiguity, but I don't want to change the default behavior here. gcal would have to add support for the option too somehow.

neilgupta avatar Sep 03 '20 16:09 neilgupta