*** Welcome to piglix ***

ISO week date


The ISO week date system is effectively a leap week calendar system that is part of the ISO 8601 date and time standard issued by the International Organization for Standardization (ISO) since 1988 (last revised in 2004) and, before that, it was defined in ISO (R) 2015 since 1971. It is used (mainly) in government and business for fiscal years, as well as in timekeeping. This was previously known as "Industrial date coding". The system specifies a week year atop the Gregorian calendar by defining a notation for ordinal weeks of the year.

The Gregorian leap cycle, which has 97 leap days spread across 400 years, contains a whole number of weeks (20871). In every cycle there are 71 years with an additional 53rd week (corresponding to the Gregorian years that contain 53 Thursdays). An average year is exactly 52.1775 weeks long; months (1/12 year) average at exactly 4.348125 weeks.

An ISO week-numbering year (also called ISO year informally) has 52 or 53 full weeks. That is 364 or 371 days instead of the usual 365 or 366 days. The extra week is sometimes referred to as a leap week, although ISO 8601 does not use this term.

Weeks start with Monday. Each week's year is the Gregorian year in which the Thursday falls. The first week of the year, hence, always contains 4 January. ISO week year numbering therefore slightly deviates from the Gregorian for some days close to 1 January.

A date is specified by the ISO week-numbering year in the format YYYY, a week number in the format ww prefixed by the letter 'W', and the weekday number, a digit d from 1 through 7, beginning with Monday and ending with Sunday. For example, the Gregorian date 31 December 2006 corresponds to the Sunday of the 52nd week of 2006, and is written 2006-W52-7 (extended form) or 2006W527 (compact form).

The ISO week-numbering year number deviates from the number of the Gregorian year on, if applicable, a Friday, Saturday, and Sunday, or a Saturday and Sunday, or just a Sunday, at the start of the Gregorian year (which are at the end of the previous ISO year) and a Monday, Tuesday and Wednesday, or a Monday and Tuesday, or just a Monday, at the end of the Gregorian year (which are in week 01 of the next ISO year). In the period 4 January to 28 December and on all Thursdays the ISO week-numbering year number is always equal to the Gregorian year number.


...
Wikipedia

...