eli5: What is an IsoWeek?


I get that it has something to do fiscal years and it has something to do with leap year, but for the life of me I can’t make the connection nor make the distinction between IsoWeeks and just counting the number of weeks it has been since the first full week of the year.

Wait. Is the first full week of the year week 1? I know this is only for the Georgian calendar, right? Or… is there different IsoWeeks for different calendars? Do people actually use IsoWeeks?

I am in fact feeling like a five year old right now.

In: 2

Iso stands for international standard organization, but I couldn’t tell you what they define as a week. Assuming there is a standard there should be a number for it like: ISOxxxx

This is entirely based on the [Wikipedia article](https://en.wikipedia.org/wiki/ISO_week_date).

Many decades ago, when designing how certain business processes should work (think accounting / payroll), they decided those processes should occur weekly.

So they decided to come up with their own calendar system: The ISO week date system.

The main reason they decided to create a new calendar system is that the normal (Gregorian) calendar has a problem: There are 365 (or 366) days in a year. 52 weeks is 52×7 = 364 days. Mathematically, neither 365 nor 366 is divisible by 7. This means that in every single year, the first week or the last week or both will be split between two different years.

So when designing the calendar, they decided on the following specs:

– Monday is the first day of a new week.
– Every week is considered to be entirely within a single year.
– If a week would be split by the end of the year, put the whole week into whichever year its Thursday is in.

Why Thursday? Because it’s the midpoint of a week. And for any week, the majority of its days fall in the same year as its midpoint.

Anyway, after establishing the above rules, they added a couple more rules related to numbering:

– Monday is day 1 of the week. Sunday is day 7 of the week. (Tuesday through Saturday are consecutively numbered 2-6 as you’d expect.)
– The first week of the year is “week 1” abbreviated W01. (The following weeks are consecutively numbered as you’d expect.)

In 2022, January 1 was a Saturday. Since the Thursday of that week was in December, January 1 would actually belong to the *previous* year. So the day most people call “January 1, 2022” in the normal (Gregorian) calendar is “2021-W52-6” in the ISO week date calendar. The next day would be 2021-W52-7. The ISO week calendar finally rolls over to 2022 on January 3, 2022 which is 2022-W01-1.

Today’s date is August 7, 2022. In the ISO week system, this date would be 2022-W31-7. You get the “31” by counting how many weeks there were in 2022 up until August 7, keeping in mind the rule for handling the split week at the beginning of the year. The “7” matches up because August started on a Monday. In a different year — say 2021 — when August started on a Sunday — this would be different. August 7, 2021 would be 2021-W31-6.

When they came up with this system, it was originally called “Industrial date coding.” Later the system was approved by the International Standards Organization (ISO for short), and renamed to “ISO week date”. ISO is basically a committee whose mission is to create and maintain the international standards for everything that can be standardized. A lot of software, business, industrial and government stuff in many different countries operates according to ISO standards. By following ISO approved specifications, different organizations use the same solutions to the same problem, which makes it easier for them to work together.