Print what half of the year we are in

What I’m trying to do

I am trying to print 1 if the current month is <7 otherwise 2 but can’t seem to get if else work with templater

Things I have tried

I have tried a couple of code snippets but nothing seems to work I get errors about the if statement

What about this:

<%* if (tp.date.now("M") > 6)
	{ %> 2 <%* }
	else { %> 1 <%* }
%>

Cheers, Marko :nerd_face:

1 Like

Thank you so much, i was using basically the same code but my syntax was wrong

1 Like