When the last two digits of the year change, as every 12 months they inevitably do, muscle memory tends to work against us. As Johnny Decimal says, don’t type the date by hand! Johnny recommends using Raycast to create a snippet that automatically creates today’s date in the correct format.
Yes, I said correct format because there’s only one right way to type the date but many wrong ways that cause the space-time continuum to shake on its timey-wimey foundations! I’m not talking about the dates you hand write in longhand at the top of a physical page; knock yourself out with those. This is about dates written entirely in numbers.
I’ve known for years that year-month-day is the only format that sorts chronologically in the digital world, but what I didn’t know when this post was published is that of the two ways to write the code that becomes year-month-day dates (yyyy-mm-dd
and YYYY-mm-dd
), it matters which one you choose.
Both can be correct, in the right context.
This post from David Smith reminded me that yyyy
is the one most people are looking for. When I was creating Obsidian templates for my weekly notes, however, YYYY
was the correct choice. I finally understand why they aren’t and should not be interchangeable. ^1
Your assignment, should you choose to accept it, is to set yourself up with a keyboard shortcut to insert the correctly formatted current date wherever it’s needed. Text Expander and Keyboard Maestro are two capable paid options, or you can follow Johnny’s instructions to use the free utility, Raycast. There are others. ^2
Obsidian has the Natural Language Dates plugin that does the job nicely, but I recommend a system-wide solution that doesn’t just work in one app alone.
[^1] There’s also gggg
and GGGG
for week years. I have yet to learn the difference between the Gs and the Ys. See https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/
[²] I don’t know all the ways to automatically add the date when typing, but there are a lot of them. Text Expander, for example. In Keyboard Maestro I use (%ICUDateTime%yyyy-MM-dd%)
, in Drafts [[date|%Y-%m-%d]].
Note that the code Drafts uses for dates is a little different. Learn more here.
💬 I love to hear from readers! Comment via email · Mastodon · Bluesky
If you get value from my work I invite you to share this post with someone you think will like it, or to make a contribution to my support jar. Every gift helps to keep me an independent creator and is greatly appreciated. You may also like to check out the free resources on my productivity themed Gumroad store.
Follow my RSS feed, or sign up to receive posts in your inbox