Created
October 17, 2021 08:29
-
-
Save TfTHacker/9d9769bcf9a87f878205da088e10807e to your computer and use it in GitHub Desktop.
Weekday/Weekend for 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 ( [1,2,3,4,5].includes(fileDate.day()) ) { %> | |
Weekday | |
<%* } else if( [0,6].includes(fileDate.day())) { %> | |
Weekend | |
<%* } %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment