Maximum Daily Note Linking

I use Daily Notes every day. In an attempt to get maximum linking across notes, I have created a list of date formats to use as aliases in your front-matter. I am the first to admit this is completely overkill, but if you want any date mention to link back to the appropriate daily note, this should help.

My chosen format is YYYY.MM.DD, and I use it almost every time I write a date, but if I’m copying text in, I don’t want to have to go edit every date. This should fix that. I have been using a paired down version of this list for months now but decided to expand it and share.

I know I missed some formats, but these were the ones I have run into in the past. Let me know if there are any must-haves.

Setup

  1. Install Templater Plugin and set it up
  2. Add the following to your front-matter on your daily note template, and you should have most dates covered.
---
aliases: ["{{tp_title_date:f="MMMM Do, YYYY"}}","{{tp_title_date:f="MMMM D, YYYY"}}",
"{{tp_title_date:f="MMM D, YYYY"}}","{{tp_title_date:f="MMM. D, YYYY"}}","{{tp_title_date:f="M/D/YYYY"}}","{{tp_title_date:f="M-D-YYYY"}}","{{tp_title_date:f="YYYY-MM-DD"}}","{{tp_title_date:f="M.D.YYYY"}}","{{tp_title_date:f="D MMM YYYY"}}","{{tp_title_date:f="MM.D.YYYY"}}","{{tp_title_date:f="DD MMM YYYY"}}","{{tp_title_date:f="DDMMYYYY"}}","{{tp_title_date:f="YYYYMMDD"}}","{{tp_title_date:f="YYMMDD"}}","{{tp_title_date:f="YYYY.MM.DD"}}",]
---

Here’s what they all would look like once Templater does it’s thing:

---
aliases: ["February 27th, 2021","February 27, 2021",
"Feb 27, 2021","Feb. 27, 2021","2/27/2021","2-27-2021","2021-02-27","2.27.2021","27 Feb 2021","02.27.2021","27 Feb 2021","27022021","20210227","210227","2021.02.27",]
---

Here is what each one means if you want to pick and choose.

Example Formatting
2021.02.27 “{{tp_title_date:f=“YYYY.MM.DD”}}”,
February 27th, 2021 “{{tp_title_date:f=“MMMM Do, YYYY”}}”,
February 27, 2021 “{{tp_title_date:f=“MMMM D, YYYY”}}”,
Feb 27, 2021 “{{tp_title_date:f=“MMM D, YYYY”}}”,
Feb. 27, 2021 “{{tp_title_date:f=“MMM. D, YYYY”}}”,
2/27/2021 “{{tp_title_date:f=“M/D/YYYY”}}”,
2-27-2021 “{{tp_title_date:f=“M-D-YYYY”}}”,
2021-02-27 “{{tp_title_date:f=“YYYY-MM-DD”}}”,
2.27.2021 “{{tp_title_date:f=“M.D.YYYY”}}”,
27 Feb 2021 “{{tp_title_date:f=“D MMM YYYY”}}”,
02.27.2021 “{{tp_title_date:f=“MM.D.YYYY”}}”,
02 Feb 2021 “{{tp_title_date:f=“DD MMM YYYY”}}”,
27022021 “{{tp_title_date:f=“DDMMYYYY”}}”,
20210227 “{{tp_title_date:f=“YYYYMMDD”}}”,
210227 “{{tp_title_date:f=“YYMMDD”}}”,
5 Likes

It looks like Templater updated its syntax a bit since this post was written, so I updated it to the new syntax:

---
aliases: ["<% tp.date.now("MMMM Do, YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("MMMM D, YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("MMM D, YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("MMM. D, YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("M/D/YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("M-D-YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("M.D.YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("D MMM YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("MM.D.YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("DD MMM YYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("DDMMYYYY", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("YYYYMMDD", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("YYMMDD", 0, tp.file.title, "YYYY-MM-DD") %>", "<% tp.date.now("YYYY.MM.DD", 0, tp.file.title, "YYYY-MM-DD") %>",]
---
4 Likes

Thanks. I was thinking about this, but didn’t think anyone had used the code.

1 Like

I’m loving the idea of this, but cannot seem to make it work. What could I be doing wrong?

just tried this for you—look at the last bit where it says file.title. it is assuming/needs your daily note files to be in the YYYY-MM-DD format