Here is at least a one line script you could run on the command line, only tested on a Mac:
gsed -i -e 's/\([1-3]\? \?[A-Z][a-z]*\) \([0-9][0-9]\?[0-9]\?:[0-9][0-9]\?-\?[0-9]\?[0-9]\?\)/ \[\[\1#\2\]\]/g' -e 's/\[\[ /\[\[/g' *.md
That will run the substitution on any file ended in .md
in the current working directory.