I spent a couple hours working on this this morning so I thought I would share in case anyone else is trying to get a daily note template set up with annual subfolders.
This uses the core Daily Notes plugin as well as using/working with community plugins Templater and Calendar (that is, clicking a date in calendar creates a new daily note in the correct annual subfolder, even if not already created, with correct yesterday and tomorrow notes). Also populates the day of the week and the full spelled out date in the header.
You could cut down on the breadcrumb code by using words like âyesterdayâ and âtomorrowâ or âpreviousâ and ânextâ but I prefer to have the dates linked so I made the code print those, too.
Dumb question @coppereye:
I copied the code above at the beginning of my template (the one used by the Daily Note Plugin) but once the note is created the code is stil there as code: i.e., nothing is created
What am I doing wrong?
Thx!
I think the default curly-brackets built-in templating date engine might have been updated to be smart enough to do this without Templatr? But Iâm too new to be sure.
Sorry I missed the replies here, wasnât getting any notifications about them. The only reason I can think you might have a problem with the date format is due to not setting up the format on Daily Notes to match? My daily notes format is YYYY/MM-DD. I copied the code straight from my template so if thatâs not the issue Iâm not sure what else could cause it.
Same problem here. Did you solve this issue?
I find out that when I create a note using Templater command ''Templater: Create new note from template", this problem does not occur.
However, only when I create a new daily note by clicking the date in Calendar, it happens.
I think mainly reason for this is that Calendar uses core plugin Template, not Templater.
But even though I can guess the cause for this, I cannot find a way to fix it
EDIT: @nestorito@IDeezel
I just figured it out! Toggle the following option in Templater settings.
EDIT2:
If you want to use this feature for calendar, you can directly use the following commands:
{{yesterday}}
{{tomorrow}}
{{date-1d:YYYY-MM-DD}} // yesterday
{{date+2d:YYYY-MM-DD}} // in two days
{{date+1M:YYYY-MM-DD}} // next month
{{date+10y:YYYY-MM-DD}} // in 10 years
{{date +7d}} // use default format
How do you use this with Daily Notes? As in why would it still require having the core Daily Notes plugin enabled? Isnât using Templater more of a replacement for it?