Add --due-date and --clear-due-date to the edit command - #108
Merged
Merged
Conversation
The edit command could change a reminder's title and notes but had no way to change its due date, even though add supports --due-date. This adds: - edit --due-date/-d <date>: set a new due date, parsed with the same natural language parser add uses - edit --clear-due-date: remove the due date entirely Setting a new due date replaces any existing alarms, and adds an absolute alarm when the parsed date includes a time, matching add's behaviour. Clearing the due date also removes existing alarms. --due-date and --clear-due-date are mutually exclusive, and edit now accepts a due date change alone (previously it required new text or notes).
alexspeller
added a commit
to alexspeller/reminders-cli
that referenced
this pull request
Aug 29, 2026
Upstream (keith#108) removes every alarm when a due date changes, which destroys location alarms that have nothing to do with the due date. Only time-based alarms are tied to the due date, so remove just those — matching the behaviour of the clear-due-date subcommand.
udondan
referenced
this pull request
in udondan/reminders-cli
Sep 13, 2026
`reminders add` supports `-d/--due-date`, but `reminders edit` had no way to change a reminder's due date - only its title and notes. Changing a due date meant deleting and re-adding the reminder. This adds to `edit`: - `-d/--due-date <date>` - set a new due date, parsed by the same `DateComponents` natural-language parser `add` uses - `--clear-due-date` - remove the due date entirely Behaviour details: - Setting a new due date clears existing alarms and adds an absolute alarm when the parsed date includes a time, mirroring `add`. - Clearing the due date also clears alarms, so a stale notification doesn't fire. - The two flags are mutually exclusive. - `edit` now accepts a due-date change on its own; previously validation required new text or notes. Tested manually against a scratch list on macOS: setting a date, setting a date with a time, clearing, combining a date change with new text, and both validation errors. ``` $ reminders edit Soon 0 --due-date "tomorrow 9am" Updated reminder 'Some edited text' $ reminders edit Soon 0 --clear-due-date Updated reminder 'Some edited text' ``` Branched off `main` and independent of #107 (--repeat); no overlapping changes.
keith
pushed a commit
that referenced
this pull request
Sep 17, 2026
`EKReminder.dueDateComponents` only accepts `DateComponents` whose
`calendar` is Gregorian or `nil`.
`NaturalLanguage.swift` builds them with `Calendar.current`, which
follows the calendar the user picked in
System Settings > General > Language & Region. With a non-Gregorian
calendar (e.g. Japanese or Buddhist),
every `--due-date` aborts:
```
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'Calendar must be nil or Gregorian'
2 EventKit -[EKReminder(Shared) setDueDateComponents:] + 948
3 reminders RemindersLibrary.Reminders.addReminder(string:notes:toListNamed:dueDateComponents:priority:outputFormat:)
```
It happens for every `--due-date` spelling (`2026-09-30`, `2026-09-30
10:00`, `tomorrow at 10am`).
`edit --due-date` from #108 goes through the same parser, so it is
affected as well.
To reproduce without changing the system-wide setting, set the locale
for `reminders` only:
```console
$ defaults write reminders AppleLocale -string "ja_JP@calendar=japanese"
$ reminders add <list> "test" --due-date tomorrow
$ defaults delete reminders AppleLocale
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
reminders addsupports-d/--due-date, butreminders edithad no way to change a reminder's due date - only its title and notes. Changing a due date meant deleting and re-adding the reminder.This adds to
edit:-d/--due-date <date>- set a new due date, parsed by the sameDateComponentsnatural-language parseradduses--clear-due-date- remove the due date entirelyBehaviour details:
add.editnow accepts a due-date change on its own; previously validation required new text or notes.Tested manually against a scratch list on macOS: setting a date, setting a date with a time, clearing, combining a date change with new text, and both validation errors.
Branched off
mainand independent of #107 (--repeat); no overlapping changes.