
https://github.com/jgm/pandoc/issues/2865

I found that if I do this in the YAML metadata:

date:   \today

In latex output it will leaves it as is, so latex will then be able to substitute today there. But I'm not sure if it will break anything in other output formats.


It will only work in LaTeX/PDF.

Your best bet is to set the date on the command line,
e.g.

--metadata date="`date +%D`"

on linux/unix.


FWIW: lua filters will allow to set the date like this in a fully portable manner:

function Meta(m)
  m.date = os.date("%B %e, %Y")
  return m
end
