reminders-cli icon indicating copy to clipboard operation
reminders-cli copied to clipboard

due-date doesn't respect 24 hour clock

Open sitase opened this issue 3 years ago • 1 comments

It is a bit past eleven in the morning:

reminders add Hem kaka bulle -d 12:00                                                                                
Added 'kaka bulle' to 'Hem'
 simon@simonq> reminders show Hem                                                                                                    

49: kaka bulle (för 11 timmar sedan)

sitase avatar Jun 22 '21 09:06 sitase

Turns out that 12:01 works and renders a reminder at one minute past noon. 12:00 is always interpreted as midnight which would be wrong under a 12-hour clock as well. Interestingly enough, it is interpreted as midnight past, not next. One would expect reminders to be set in the future.

sitase avatar Jun 22 '21 10:06 sitase

I believe what you're experiencing is because of an oddity in the reminders API, where the only way I found to force reminders to display the due date as "today" was to give it a date at 12:00, any other time would make reminders show the exact time. https://github.com/keith/reminders-cli/blob/b897114cac158549dcea10ce667ed68c276bbd3c/Sources/RemindersLibrary/NaturalLanguage.swift#L31-L37

keith avatar Nov 06 '22 02:11 keith

fixed in https://github.com/keith/reminders-cli/pull/50

keith avatar Dec 15 '22 01:12 keith