robarnolddev / todo-txt

Todo.txt syntax highlighter and helper extension for visual studio code.
MIT License
53 stars 10 forks source link

Completion date missing #5

Open metbril opened 5 years ago

metbril commented 5 years ago

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.

Fildor commented 5 years ago

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.