ISO week date

From Wikipedia, the free encyclopedia

The ISO week date system is a leap week calendar system that is part of the ISO 8601 date and time standard. The system is used (mainly) in government and business for fiscal years, as well as in timekeeping.

The system uses the same cycle of 7 weekdays as the Gregorian calendar. Weeks start with Monday. ISO years have a year numbering which is approximately the same as the Gregorian years, but not exactly (see below). An ISO year has 52 or 53 full weeks (364 or 371 days). The extra week is called a leap week, a year with such a week a leap year.

A date is specified by the ISO 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, 2006-W52-7 (or in its most compact form 06W527) is the Sunday of the 52nd week of 2006. In the Gregorian system this day is called 31 December 2006.

The system has a 400-year cycle of 146,097 days (20,871 weeks), with an average year length of exactly 365.2425 days, just like the Gregorian calendar. Since non-leap years have 52 weeks, in every 400 years there are 71 leap years.

Contents

[edit] Relation with the Gregorian calendar

The ISO 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–28 December and on all Thursdays the ISO year number is always equal to the Gregorian year number.

Mutually equivalent definitions for week 01 are:

  • the week with the year's first Thursday in it
  • the week with the year's first working day in it (if Saturdays, Sundays, and 1 January are no working days)
  • the week with January 4 in it
  • the first week with the majority (four or more) of its days in the starting year
  • the week starting with the Monday in the period 29 December - 4 January
  • the week with the Thursday in the period 1 - 7 January
  • If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in week 01. If 1 January is on a Friday, Saturday or Sunday, it is in week 52 or 53 of the previous year.

Note that while most definitions are symmetric with respect to time reversal, one definition in terms of working days happens to be equivalent.

The last week of the ISO year is the week before week 01; in accordance with the symmetry of the definition, equivalent definitions are:

  • the week with the year's last Thursday in it
  • the week with December 28 in it
  • the last week with the majority (four or more) of its days in the ending year
  • the week starting with the Monday in the period 22 - 28 December
  • the week with the Thursday in the period 25 - 31 December
  • the week ending with the Sunday in the period 28 December - 3 January
  • If 31 December is on a Monday, Tuesday, or Wednesday, it is in week 01, otherwise in week 52 or 53.

The following years have 53 weeks:

  • years starting with Thursday
  • leap years starting with Wednesday

[edit] Examples

  • 2005-01-01 is 2004-W53-6
  • 2005-01-02 is 2004-W53-7
  • 2005-12-31 is 2005-W52-6
  • 2007-01-01 is 2007-W01-1 (both years 2007 start with the same day)
  • 2007-12-30 is 2007-W52-7
  • 2007-12-31 is 2008-W01-1
  • 2008-01-01 is 2008-W01-2 (Gregorian year 2008 is a leap year, ISO year 2008 is 2 days shorter: 1 day longer at the start, 3 days shorter at the end)
  • 2008-12-29 is 2009-W01-1
  • 2008-12-31 is 2009-W01-3
  • 2009-01-01 is 2009-W01-4
  • 2009-12-31 is 2009-W53-4 (ISO year 2009 is a leap year, extending the Gregorian year 2009, which starts and ends with Thursday, at both ends with three days)
  • 2010-01-03 is 2009-W53-7

[edit] Examples where the ISO year is three days into the next gregorian year

  • {{ ISOWEEKDATE|2009|12|31}} gives 2009-W53-4
  • {{ ISOWEEKDATE|2010|1|1}} gives 2009-W53-5
  • {{ ISOWEEKDATE|2010|1|2}} gives 2009-W53-6
  • {{ ISOWEEKDATE|2010|1|3}} gives 2009-W53-7
  • {{ ISOWEEKDATE|2010|1|4}} gives 2010-W01-1

[edit] Examples where the ISO year is three days into the previous gregorian year

  • {{ ISOWEEKDATE|2008|12|28}} gives 2008-W52-7
  • {{ ISOWEEKDATE|2008|12|29}} gives 2009-W01-1
  • {{ ISOWEEKDATE|2008|12|30}} gives 2009-W01-2
  • {{ ISOWEEKDATE|2008|12|31}} gives 2009-W01-3
  • {{ ISOWEEKDATE|2009|1|1}} gives 2009-W01-4

The system does not need the concept of month and is not well connected with the Gregorian system of months: some months January and December are divided over two ISO years.

[edit] Week number

Overview of dates with a fixed week number in any year other than a leap year starting on Thursday:

January January 4th, 11th, 18th, & 25th  wk 1-4
February February 1st, 8th, 15th, & 22nd  wk 5-8
March March 1st, 8th, 14th, 22nd, & 29th  wk 9-13
April April 5th, 12th, 19th, & 26th  wk 14-17
May May 3rd, 10th, 17th, 24th, & 31st  wk 18-22
June June 7th, 14th, 21st, & 28th  wk 23-26
July July 5th, 12th, 19th, & 26th  wk 27-30
August August 2nd, 9th, 16th, 23rd, & 30rd  wk 31-35
September September 6th, 13rd, 20th, & 27th  wk 36-39
October October 4th, 11st, 18th, 25th  wk 40-43
November November 1st, 8th, 15th, 22nd, & 29th  wk 44-48
December December 6th, 13th, 20th, & 27th  wk 49-52

The day of the week for these days are related to Doomsday because for any year, the Doomsday is the day of the week that the last day of February falls on. These dates are one day after the Doomsdays, except that in January and February of leap years the dates themselves are Doomsdays. In leap years the week number is the rank number of its Doomsday.

[edit] Advantages

  • The date directly tells the weekday.
  • All years start with a Monday and end with a Sunday.
  • When used by itself without using the concept of month, all years are the same except that leap years have a leap week at the end.
  • The weeks are the same as in the Gregorian calendar.

[edit] Disadvantages

Each equinox and solstice varies over a range of at least seven days. This is because each equinox and solstice may occur any day of the week and hence on at least seven different ISO week dates. For example, there are summer solstices on 2004-W12-7 and 2010-W11-7.

It cannot replace the Gregorian calendar, because it relies on it to define the new year day (Week 1 Day 1).

[edit] The leap year cycle

Below is the 400-year cycle of years in terms of the dominical letter of the year as shown on the right. The three types of week leap year are D, DC, and ED.

Dominical
letter
Doomsday
A or BA Tuesday
B or CB Monday
C or DC Sunday
D or ED Saturday
E or FE Friday
F or GF Thursday
G or AG Wednesday
            ,----,----,----,----,
            |1600|1700|1800|1900|
            |2000|2100|2200|2300|
,-----------+----+----+----+----|
|         00| BA | C  | E  | G  |
|-----------+----+----+----+----|
|85 57 29 01| G  | B  |<D> | F  |
|86 58 30 02| F  | A  | C  | E  |
|87 59 31 03| E  | G  | B  |<D> |
|88 60 32 04|<DC>| FE | AG | CB |
|-----------+----+----+----+----|
|89 61 33 05| B  |<D> | F  | A  |
|90 62 34 06| A  | C  | E  | G  |
|91 63 35 07| G  | B  |<D> | F  |
|92 64 36 08| FE | AG | CB |<ED>|
|-----------+----+----+----+----|
|93 65 37 09|<D> | F  | A  | C  |
|94 66 38 10| C  | E  | G  | B  |
|95 67 39 11| B  |<D> | F  | A  |
|96 68 40 12| AG | CB |<ED>| GF |
|-----------+----+----+----+----|
|97 69 41 13| F  | A  | C  | E  |
|98 70 42 14| E  | G  | B  |<D> |
|99 71 43 15|<D> | F  | A  | C  |
|   72 44 16| CB |<ED>| GF | BA |
|-----------+----+----+----+----|
|   73 45 17| A  | C  | E  | G  |
|   74 46 18| G  | B  |<D> | F  |
|   75 47 19| F  | A  | C  | E  |
|   76 48 20|<ED>| GF | BA |<DC>|
|-----------+----+----+----+----|
|   77 49 21| C  | E  | G  | B  |
|   78 50 22| B  |<D> | F  | A  |
|   79 51 23| A  | C  | E  | G  |
|   80 52 24| GF | BA |<DC>| FE |
|-----------+----+----+----+----|
|   81 53 25| E  | G  | B  |<D> |
|   82 54 26|<D> | F  | A  | C  |
|   83 55 27| C  | E  | G  | B  |
|   84 56 28| BA |<DC>| FE | AG |
'-----------+----+----+----+----|
            |1600|1700|1800|1900|
            |2000|2100|2200|2300|
            '----'----'----'----'


Thus the ISO leap years in one 400-year cycle are (with this time the 28-year subcycles arranged horizontally):

  D    ED     D    DC     D
1903  1908  1914  1920  1925 
1931  1936  1942  1948  1953 
1959  1964  1970  1976  1981 
1987  1992  1998  2004  2009 
2015  2020  2026  2032  2037 
2043  2048  2054  2060  2065 
2071  2076  2082  2088  2093 
2099 
                        2105 
2111  2116  2122  2128  2133 
2139  2144  2150  2156  2161 
2167  2172  2178  2184  2189 
2195 
                        2201 
2207  2212  2218  2224  2229 
2235  2240  2246  2252  2257 
2263  2268  2274  2280  2285 
2291  2296

There are 13 28-year subcycles with 5 leap years each, and 6 remaining leap years in the remaining 36 years (the absence of leap days in the Gregorian calendar in 2100, 2200, and 2300 interrupts the subcycles). The leap years are 27 times 5 years apart, 43 times 6 years, and once 7 years. (A slightly more even distribution would be possible: 26 times 5 years apart, and 45 times 6 years.)

The Gregorian years corresponding to the 71 ISO leap years can be subdivided as follows:

Thus 27 ISO years are 5 days longer than the corresponding Gregorian year, and 44 are 6 days longer. Of the other 329 Gregorian years (neither starting nor ending with Thursday), 70 are Gregorian leap years, and 259 are non-leap years, so 70 ISO years are 2 days shorter, and 259 are 1 day shorter.

[edit] Other week numbering systems

For an overview of week numbering systems see week number. The US system has weeks from Sunday through Saturday, and partial weeks at the beginning and the end of the year. An advantage is that no separate year numbering like the ISO year is needed, while correspondence of lexicographical order and chronological order is preserved.

[edit] See Also

[edit] External links

In other languages