keith / reminders-cli

A simple CLI for interacting with macOS reminders
MIT License
666 stars 53 forks source link

due-date doesn't respect 24 hour clock #33

Closed sitase closed 1 year ago

sitase commented 3 years ago

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 commented 3 years ago

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.

keith commented 1 year ago

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 commented 1 year ago

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