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

Hi, this is extremely useful, thanks! Quick question: how can I modify the script if I want it to not return the string (invalid date) if I use other texts in parentheses?

Thanks, Hans