Search code examples
dateyamlexpr

How can I use !expr for inline coding in qarto with python?


In my YAML Header I try this for date:

date: "`!expr format(Sys.time(), '%B %d, %Y')`"
date-format: dddd, D MMM YYYY
lang: de

But if I render I receive an error message:

Invalid Date

Did I use !expr in the correct way?


Solution

  • I found the answer in the Quarto documentation:

    date: today
    

    will help in the specific language format.