keith / reminders-cli

A simple CLI for interacting with macOS reminders
MIT License
663 stars 52 forks source link

Add private API for knowing if time should be used #50

Closed keith closed 1 year ago

keith commented 1 year ago

When parsing the natural language text like 'today', you get back a full NSDate with a time set at 12:00. Previously to understand this case I would remove the time if it was noon, which also broke you manually specifying '12:00'. It turns out there's a private API for this instead, so this now safely calls that, warning if it breaks. This at least works on macOS 13 but based on class dumps I think it has been around since at least 2018.

Fixes https://github.com/keith/reminders-cli/issues/33