Templater script for daily notes with weekly summary

Just started with Obsidian and trying to make a journal by copying/pasting great stuff from other users with skills :slight_smile: However I’m running into problems with my Weekly Review

For my Yesterday ↔ Tomorrow daily notes:

[[journal/daily/<%tp.date.now("YYYY/MM/YYYY-MM-DD dddd",-1,tp.file.title,"YYYY-MM-DD dddd")%>|Yesterday]] <-> [[journal/daily/<%tp.date.now("YYYY/MM/YYYY-MM-DD dddd",1,tp.file.title,"YYYY-MM-DD dddd")%>|Tomorrow]]

This is working fine, but

For the weekly summary I’m using this:


and I only get “Invalid date” for the weekly summary. Somebody sees what’s wrong?

Edit: if I remove the dddd it’s working, but I would like to see the day in letters :laughing:

You can precise the format of the date used as an input when using moment(), so in this case, this would be the format you used for the title of your daily note (I guess) :blush: .

So maybe, assuming your daily note/tp.file.title is formatted as YYYY-MM-DD dddd, this could work for the link to your weekly note :

[[<% moment(tp.file.title, "YYYY-MM-DD dddd").format("gggg[-W]ww") %>]]

Thanks a lot!:+1::grin:

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