|||

There’s only One Right Way to Write the Date

PTPL 137 · And, no, yyyy and YYYY are not the same thing!


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  

 

Up next Why Do New Year’s Resolutions? Every Day is Already a Fresh Start
Latest posts There’s only One Right Way to Write the Date Why Do New Year’s Resolutions? Every Day is Already a Fresh Start This is Why To Do Apps Fail and What I’m Using Instead Paper, or Paperless? Yes Please Kindness, Hope, and a Christmas Carol from Me to You Eventually Consistent: a PKM Allegory on Taking Imperfect Action Now PTPL 132 · Happy To Do Lists · Better Queries in Obsidian · Trip Template · Avoiding App Lock-in Classifying Notes in an OBTF, Inspired By the Dash-Plus System 2025 Markdown Calendars If You’re Keeping Tasks in Your Calendar, I Hope You Know What You’re Doing No and Low-Clutter Gifts for Apple, PKM, and Analog Enthusiasts PTPL 129 · Live Out of Your Notes the Way Tom Lives Out of His Car Inktober 2024 PTPL 128 · Keep Your Content Separate From the Container in Which It Lives PTPL 127 · On Backing Up Paper, and Static Websites for Tiny Archives Efficient App Agnostic Tasks in a Single Plain Text File (Obsidian Optional) PTPL 126 · What the Dash-Plus System Looks Like in My OBTF and Analog Notes Word Puzzles (that aren’t Wordle) PTPL 125 · Choosing Between Digital and Analog, and a Plain Text Accounting Update How to Keep Your Wheels Turning Smoothly Despite the Automation Paradox PTPL 124 · Saving Safari tabs as Markdown links, and Mono Fonts in Obsidian Looking Through Windows (From the Outside In) PTPL 123 · ‘Analog Office’ Blog and Tomoe River Planner Recommendations Mastodon and the Fediverse — Social Media’s Brighter Future Celebrating Independent Indie Blogs PTPL 122 · Aligning Your Task List with Your (Changing) Values PTPL 121 · Getting Focused With a 4-Quadrant Weekly Planning Matrix PTPL 120 · Quick Add vs Text Expansion in Obsidian Touch Typing For Classic Book Fans Your Name in Landsat Psst — They Don't Know What You're Talking About
... ... ... ...