Skip to content

Instantly share code, notes, and snippets.

@TfTHacker
Created October 17, 2021 08:06
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Day of Week with templater
<%*
window.fileDate = app.plugins.getPlugin('nldates-obsidian').parseDate(tp.file.title).moment;
window.fileDate = window.fileDate.isValid() ? window.fileDate : moment();
if(fileDate.day()==0) { %>
Sunday
<%* } else if(fileDate.day()==1) { %>- <%'['%> ]
Monday
<%* } else if(fileDate.day()==2) { %>- <%'['%> ]
Tuesday
<%* } else if(fileDate.day()==3) { %>- <%'['%> ]
Wednesday
<%* } else if(fileDate.day()==4) { %>- <%'['%> ]
Thursday
<%* } else if(fileDate.day()==5) { %>- <%'['%> ]
Friday
<%* } else if(fileDate.day()==6) { %>
Saturday
<%* } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment