Linking to last created Daily Note

The date for the day before is calculated the first time the template is executed. If you create the daily note each day, it won’t fail and the links to previous and following days will be ok.

If you need to create a note for a future/past day, there is a reply to a post that may help you. It uses the Daily notes and Calendar plugins.

  1. Define your daily note template using these variables: {{yesterday}} and {{tomorrow}}
    # {{date}}
    
    [[{{yesterday}}|< {{yesterday}}]] | [[{{tomorrow}}|{{tomorrow}} >]]
    
  2. Create a daily note from the calendar (e.g. clicking on the 23rd of June)
    # 2021-06-23
    
    [[2021-06-22|< 2021-06-22]] | [[2021-06-24|2021-06-24 >]]
    

Result in preview

NOTE: If you need something more specific than that and you have some JS knowledge you may be able to define a Templater Script User Function to satisfy your needs passing the tp.file.title as an argument to get the date for the previous/next day.

7 Likes