Date-First File Names: Why YYYY-MM-DD Sorts Your Notes for You
Quick answer
Prefix a file name with an ISO 8601 date — YYYY-MM-DD — and it sorts chronologically the moment you save it. No renaming, no extra metadata, no special app. The trick is order: the standard writes dates largest unit to smallest — year, then month, then day — so the same left-to-right comparison your file system already uses for alphabetical sort ends up producing chronological sort for free.
Compare these two folders:
2026-09-25-launch-notes.md
2026-10-02-launch-notes.md
2026-10-15-launch-notes.md9-25-2026-launch-notes.md
10-2-2026-launch-notes.md
10-15-2026-launch-notes.mdThe first list sorts correctly under plain alphabetical order. The second doesn't. 10-15 and 10-2 both sort ahead of 9-25 as text, even though September comes first. Same files, same information — one naming choice makes the difference.
Step-by-step
Pick the format: YYYY-MM-DD
Use a four-digit year, a two-digit month, and a two-digit day, separated by hyphens: 2026-09-25. ISO 8601 also defines an unhyphenated YYYYMMDD variant, but the standard itself recommends the hyphenated extended format for plain text. It's easier to scan, and hyphens don't collide with reserved characters on any common file system.
Zero-pad the month and day
Always write 09, never 9. A University of Connecticut Library guide on research file naming shows the same principle at work with sequence numbers: ex1, ex10, ex2, ex3 sorts wrong as text, while ex001, ex002, ex003 sorts correctly no matter how many files pile up. Dates work the same way. Skip the leading zero and 2026-9-5 sorts ahead of 2026-10-1.
Add a short, specific slug after the date
2026-09-25-client-call-notes.md tells you more at a glance than 2026-09-25-notes.md — and it sorts identically. Keep the slug lowercase, hyphen-separated, and specific enough that you don't need to open the file to know what's inside. Deciding between Markdown, plain text, or something else for the file itself? Picking the right file extension is worth a separate look.
Skip regional date formats entirely
Never write 09/25/2026 or 25-09-2026 in a file name. US and European conventions disagree on whether the month or the day comes first, and that ambiguity is exactly what ISO 8601 exists to remove. The UConn guide calls out this exact confusion as one of the most common sources of file-naming errors in shared folders.
Common problems and fixes
"My files still don't sort right." Almost always a missing zero-pad, or a folder with mixed conventions left over from before you adopted this one. Rename the stragglers once and the problem doesn't come back.
"A character that works on my Mac breaks somewhere else." File systems don't agree on what's allowed. Windows forbids : / \ ? * | " < > and reserves device names like CON and AUX; Unix-like systems forbid only the forward slash and the null character, according to Wikipedia's rundown of filename restrictions. Stick to letters, numbers, hyphens, and underscores in the slug portion of the name, and you'll never hit a platform-specific wall. Dates and slugs aren't the only place file names break silently across platforms — accented characters normalize differently between Mac and everything else, too.
"Two files landed on the same date." Add a short sequence suffix — 2026-09-25-client-call-notes-01.md, -02 — rather than a full timestamp, unless you genuinely need sub-day ordering. It stays readable and still sorts correctly.
Doing this with Carets
A date-first file name works with Carets instead of against it. Your notes and code stay in plain files, organized into files, projects, and tags, so a YYYY-MM-DD prefix gives you chronological order for free — and Carets' organization layer handles everything sort order can't, like grouping related notes into a project or tagging across dates by topic. Everything stays plain Markdown and plain text, so the files stay portable: open them anywhere, rename them with a script, move them between projects. No proprietary format locks the convention in. And because Carets is native and fast on iOS and Mac, jumping into a dated file to jot something down doesn't feel like a detour.
Naming is only half the organization story. Pairing a date-first convention with how you organize notes beyond the file name covers search that doesn't depend on remembering exact dates. Carets is free to download on the App Store for iPhone, iPad, and Mac.
Frequently Asked Questions
Why does 2026-09-25 sort correctly but 9/25/2026 doesn't?
Alphabetical sort compares characters left to right. A date written largest-unit-first — year, then month, then day — means character order and time order always agree, so a plain file name sort is also a chronological sort. Regional formats like 9/25/2026 put the month or day first, so October (10) sorts ahead of February (2) when compared as text.
Should I use YYYY-MM-DD or YYYYMMDD in file names?
Either sorts correctly, but ISO 8601 itself recommends the hyphenated YYYY-MM-DD form for plain text. It's easier to read at a glance, and the hyphens don't conflict with any common file system's reserved characters. Save YYYYMMDD for contexts where you need the shortest possible fixed-width string.
Do I need to zero-pad the month and day?
Yes. Without zero-padding, 2026-9-5 would sort before 2026-10-1 as text, even though October comes after September. Always write single-digit months and days as 09 and 05, not 9 and 5.
Where should the date go in a file name — start or end?
Put it first if you want files to sort chronologically by default — the common case for daily notes, meeting notes, and logs. Put it at the end, or leave it out and rely on the app's own organization, if you'd rather sort alphabetically by topic and only check dates occasionally.
Conclusion
A date-first, zero-padded, hyphenated file name turns your file system's default alphabetical sort into a chronological one, with nothing extra to install or remember. Once the habit sticks, the same logic extends cleanly to anything else you need ordered — zero-pad the sequence number the same way you zero-pad the day, and the sort takes care of itself.