robarnolddev/todo-txt

Completion date missing

metbril opened this issue · 1 comments

As per the spec https://github.com/todotxt/todo.txt#rule-2-the-date-of-completion-appears-directly-after-the-x-separated-by-a-space a completed task requires a completion date immediately following the x. Currently the date is not added at completion nor removed when marking as incomplete.

Actually it is optional unless you provided the prepend creation date. Example:
Valid:

This is a task
2019-04-26 This is a task
^ created
x This is a task
x 2019-04-29 2019-04-26 This is a task
  ^ completed ^ created
x 2019-04-29 This is a task
  ^ completed

INvalid:

x 2019-04-29 This is a task
  ^ Creationdate

But it would be a very cool feature to auto-include it.