-
Notifications
You must be signed in to change notification settings - Fork 228
Date no longer allowed in substitutions #747
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I am trying to format a date using Jinja2 by adding it using substitutions, but it seems like datetime objects are no longer supported consistently throughout MyST.
I thought I might make you aware of this – thanks for a nice package!
Reproduce the bug
---
myst:
substitutions:
date: 2020-02-02
---
{{ date.strftime("%b %d, %Y") }}
This worked in a prior version but now I get the following error:
'substitutions['date']' must be of type (<class 'str'>, <class 'int'>, <class 'float'>) (got datetime.date(2020, 2, 2) that is a <class 'datetime.date'>). [myst.topmatter]
List your environment
❯❯❯ jupyter-book --version
Jupyter Book : 0.15.0
External ToC : 0.3.1
MyST-Parser : 0.18.1
MyST-NB : 0.17.1
Sphinx Book Theme : 1.0.0
Jupyter-Cache : 0.5.0
NbClient : 0.5.13
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working