Add --due-date and --clear-due-date to the edit command - #108
Open
rameshbaskaran wants to merge 1 commit into
Open
Add --due-date and --clear-due-date to the edit command#108rameshbaskaran wants to merge 1 commit into
rameshbaskaran wants to merge 1 commit into
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).
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.