Embed weekly note in daily note

I am using daily notes in connection with periodic notes.
I’d like every daily note I create to have a link to the current week.

Is this possible and can you please advise me how to do it?
thanks

What I’m trying to do

You can use the Templater plugin to do this. This is the command I use: [[<% tp.date.now("YYYY-[W]ww", 0, tp.file.title, "YYYY-MM-DD_ddd") %>]].

You need to customize this based on your setup:

  • For example, for the daily note for 18 Oct 2021, the format YYYY-[W]ww creates a link to 2021-W43.
  • The week number is created relative to file name’s date. I use the format YYYY-MM-DD_ddd for my daily notes. For example, today is 2021-10-18_Mon. This allows you to create future daily notes and have it point to the correct week number.

You should be able to copy the date format from the settings page of the Periodic Notes plugin.

1 Like

thanks for replying.

I have Templater installed but haven’t learned to use it yet.

So I adapt the command you shared to the date format used in my vault and copied the snippet to the daily template, excluding [[ and ]], and is not working

You can probably use Templater as mentioned above, but it’s not necessary…you can use Periodic Notes alone to do what you’re asking. Look at the settings for Periodic Notes; there are settings for what the titles of daily, weekly, monthly, quarterly and yearly notes will be. There is also a place to specify a note as the “template” for all new daily notes. In the “template note,” put a link to the weekly note that matches the format you have in the Periodic Notes settings for the title of your weekly note.

For example, in my daily template note, I have a link like this:

[[{{date:gggg [week ]w}}]]

because gggg [week ]w is the format of my weekly note title. It comes out like 2021 week 42 for example.

You can read more about the formatting of the titles and links at the github page for Periodic Notes.

PS I just disable daily notes in the Calendar plugin and run everything through Periodic Notes.

1 Like

thanks so much for taking the time to reply, it worked on 1st attempt!
My weekly planning just got a serious improvement :sunglasses:

1 Like

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