Templater: if filename is a specific day, then display content

I’m getting myself into a bit of a mess. Using Templater I’m trying to create a conditional which looks at the file title, and if this is a specific day, e.g. Saturday (the title date is YYYY-MM-DD), the template will show content. If not Saturday, then the content doesn’t show. Any ideas welcome as I’m trying to learn more about this great plugin. :slight_smile:

<%*
let today = tp.date.now("dddd", 0, tp.file.title,"YYYY-MM-DD")
%>

<%* if (today == "Saturday") { %>
Today is Saturday
<%* }  %>
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.