I’m trying to have a week notes template, based on Templater, that allows me to generate the weeknotes in advance.
For this, I need to use the week number of the week notes title as a reference, rather than the current date.
I almost got it, but something’s not quite working as expected.
My weeknotes format is like so:
So I parse the reference date from the title like so:
<% tp.file.title.slice(0,4) %> <% tp.file.title.slice(6,8) %>
which I confirm outputs the expected:
I also confirmed that, if I hard code that value into my desired format of the template, like so:
<% tp.date.weekday("DD.MM ddd", 0, "2022 38", "YYYY ww") %>
I also get what I expected:
However, when I try and combine the two and make the command truly dynamic:
<% tp.date.weekday("DD.MM ddd", 0, "<% tp.file.title.slice(0,4) %> <% tp.file.title.slice(6,8) %>", "YYYY ww") %>
I get something weird out of it:
What am I missing here? Thanks!