What I’m trying to do
I’m trying to add this script to properties.
<%* let month = tp.date.now(“MM”)
if ((month == “09” || month == “10” || month == “11” || month == “12”)) { %>
Fall <% tp.date.now(“YYYY”)%>-<%tp.date.now(“YYYY”, 365) %>
<%* } else if ((month == “07” || month == “08”)) { %>
Summer <% tp.date.now(“YYYY”, -365)%>-<%tp.date.now(“YYYY”) %>
<%* } else { %>
Spring <% tp.date.now(“YYYY”, -365)%>-<%tp.date.now(“YYYY”) %>
<%* } %>
However, when I insert the template into a note. It says “Templater Error: template parsing error”
Things I have tried
I’ve tried changing the line breaks and it makes the script work, but when I open it into a new template, properties table won’t show up at all.
I’ve tried creating a user.script on templater. I have included a folder and I’ve added .js at the end of the file name, but I must be doing something wrong as it shows ‘undefined’ inside the template. Also, the templater options does not show any user scripts when I refresh it.