So today (7/7/22) if use the following:
[[date|%Y-W%U]]
[[date|%Y=W%V]]
[[date|%Y-W%W]]
outputs (on the Mac, not tested on iOS):
2022-W27
2022-W27
2022-W27
In somewhere like the US, where the week starts on Sunday this is not the right week number which is 28.
But I figured one of those three formats would get me the right thing and they’re not.
What are you expecting?
Formatting uses the strftime standard library. 27 is the result I get in a quick test of different implementations.
Week numbers are zero-indexed, so Jan. 1 would be in week 0 - is that throwing you off?
Note the relevance of the week with the first Thursday in it for week referencing.
2026-09-02T12:52:17+00:00 UTC+00:00 ISO 8601 is an international standard covering the worldwide exchange and communication of date and time-related data. It is maintained by the International Organization for Standardization (ISO) and was first published in 1988, with updates in 1991, 2000, 2004, and 2019, and an amendment in 2022. The standard provides a well-defined, unambiguous method of representing calendar dates and times in worldwide communications, especially to avoid misinterpreting nu...
I guess I’m expecting it to match the US locale and rule since I’m in the US.
US rule has week 1 as the week with 1/1 (so this year, because 1/1 was on a Saturday, the first week of 2022 actually included 12/26). ISO8601 has the first week as the one with 1/4 in it. They might match (like next year where both 1/1 and 1/4 are in week 1).. They might not.
The Calendar application on the Mac and iOS (and Outlook) follows the system locale and has this week as week 28.
Obsidian “Periodic Notes” plugin, which uses moment.js, also has this as week 28 per their docs:
The strftime handling of week number is a bit odd if you’re in the US.
This went right over my head and just re-read. Are you saying that we need to add 1 to the week number thats returned by the %(U|V|W) expression?