Convert informal date-times to yyyy-mm-dd [HH:MM] in TaskPaper 3 Preview

Ooops... I answered a week ago but it didn't show up here. Sorry for the delay:


thanks for the response!

  1. This is what we have:

@due(today) --> @due(2022-01-17)
@due(2 weeks) --> @due(2022-01-31 12:33:51:112)

These would return (invalid date), but I want them to stay as is:
...we can do days (or weeks) --> [stays at] ...we can do days (or weeks)
...the Byzantine Empire (395-1453) --> [stays at] ...the Byzantine Empire (395-1453)
...such as Nam June Paik's early works (e.g. Confused Rain) --> [stays at] ...(e.g. Confused Rain)

These tests also revealed that every single year in parentheses resolves to Jan 1, such as
Alison Knowles' House of Dust (1967) --> ...House of Dust (1967-01-01).
I do have years in parentheses all over the place.

  1. I can see the following solutions to this:
  • instead of returning (invalid date), it returns nothing and leaves the characters as is. I could not figure out how to change the code to do that.
  • or it is possible to have the conversion only run on tags, i.e. after the @-sign?
  • I realize the problem also occurs every time I press the closing parenthesis after an opening parenthesis, followed by another character. If the above mentioned solutions are complicated, my workaround would be to use a different hotkey to trigger the conversion.

Thanks, Hans