Every nerd knows that ISO 8601 is the “correct” way to display dates, but those who dig into the standard know that it encompasses more than YYYY-MM-DD format1. One of the stranger conformant formats uses week number; today’s date in this format is 2023-W31-3; i.e., today is the third day of the 31st week of 2023.
I’ve been using this format for note-taking for a couple years. I find it easier to track to-dos with this because it’s so easy to tell at a glance how many weeks and days I have to finish something.
In a POSIX command-line, you can print ISO-8601 week date with:
In Vim, use:
I’m not here to convince you to give up months or anything; there are plenty of confusing things about this format:
- Nobody will know what you mean if you try to talk about “week 31”
- Years have different numbers of weeks (52 or 53)
- Unless the year happens to begin on Monday, either the beginning of
January or end of December fall on a different year than the rest of that
month (which is why you need
%Yin the date format string)
ISO and epi weeks
I worked with week numbers when I helped conduct research on Influenza-like illness. The CDC publishes a weekly surveillance report, and week 40 is traditionally recognized as the beginning of each flu season. The CDC also use week numbers to track other diseases, such as Covid-19.
Unfortunately, CDC weeks (aka “epidemiological weeks”, or “epi weeks”) aren’t ISO weeks; the former start on Sunday while the latter start on Monday, which means that Sundays will have different week numbers between the two systems. Except, more confusingly, when January 1 falls on a Thursday (as it will in 2026)—then only Sunday has the same week number, and the epi week will be one behind the ISO week for the other days. This table shows the ISO week and epi week of the first Monday of the year, ordered by the day that the year starts, and illustrates some of the issues with week-based dates.
|January 1||First Monday||ISO week||Epi week|