How do I access current time data for templates ? #375
Replies: 2 comments 1 reply
-
The question was a mistake. My PC took control over me and wrote it O_o |
Beta Was this translation helpful? Give feedback.
-
No worries! I'll take a stab at it anyways. If you happened to clone/fork my template or are making your own copier template, you'll probably need to enable certain Jinja extensions (unsure why that link to Copier documentation isn't working...). Perhaps I've stayed away from the black magic of Jinja extensions, so my template is pretty bespoke and not using lots of the latest features of Copier. Looking forward to playing with some recent features eventually as the template develops. |
Beta Was this translation helpful? Give feedback.
-
Hello. I would like to add to my copier output the current date in "Y-m-d" format.
Though none of the jinja2 templating like "now" or "time.now()" work in the ".jinja" files I have.
Could you help me understand why they don't work and what I should do to get these features ?
It's not the first time that I look up some jinja code and that it doesn't work. Maybe I don't fully understand the copier eco-system ?
Many thanks.
Alan
Beta Was this translation helpful? Give feedback.
All reactions