Created
October 17, 2021 08:06
-
-
Save TfTHacker/bd7a365abd19e462428a76bf08ae934d to your computer and use it in GitHub Desktop.
Day of Week with templater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
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