ISO week date
Encyclopedia
The ISO
International Organization for Standardization
The International Organization for Standardization , widely known as ISO, is an international standard-setting body composed of representatives from various national standards organizations. Founded on February 23, 1947, the organization promulgates worldwide proprietary, industrial and commercial...

 week date
system is a leap week calendar
Leap week calendar
A leap week calendar is a calendar system with a whole number of weeks every year, and with every year starting on the same weekday. Most leap week calendars are proposed reforms to the civil calendar, but some - such as the ISO week number calendar - are simply conveniences for specific...

 system that is part of the ISO 8601
ISO 8601
ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times is an international standard covering the exchange of date and time-related data. It was issued by the International Organization for Standardization and was first published in 1988...

 date and time standard. The system is used (mainly) in government
Government
Government refers to the legislators, administrators, and arbitrators in the administrative bureaucracy who control a state at a given time, and to the system of government by which they are organized...

 and business
Business
A business is an organization engaged in the trade of goods, services, or both to consumers. Businesses are predominant in capitalist economies, where most of them are privately owned and administered to earn profit to increase the wealth of their owners. Businesses may also be not-for-profit...

 for fiscal years, as well as in timekeeping.

The system uses the same cycle of 7 weekdays as the Gregorian calendar
Gregorian calendar
The Gregorian calendar, also known as the Western calendar, or Christian calendar, is the internationally accepted civil calendar. It was introduced by Pope Gregory XIII, after whom the calendar was named, by a decree signed on 24 February 1582, a papal bull known by its opening words Inter...

. Weeks start with Monday. ISO week-numbering years have a year numbering which is approximately the same as the Gregorian years, but not exactly (see below). An ISO week-numbering year has 52 or 53 full weeks (364 or 371 days). The extra week is here called a leap week (ISO 8601 does not use the term).

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, 2006-W52-7 (or in compact form 2006W527) 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. In every 400 years there are 71 years with 53 weeks.

The first week of a year is the week that contains the first Thursday of the year.

Relation with the Gregorian calendar

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

First week

Mutually equivalent definitions for week 01 are:
  • the week with the year's first Thursday in it (the ISO 8601 definition)
  • the week starting with the Monday which is nearest in time to 1 January
  • the week with the year's first working day in it (if Saturdays, Sundays, and 1 January are not working days)
  • the week with 4 January 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
  • the week ending with the Sunday in the period 4 – 10 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.

Last week

The last week of the ISO week-numbering 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 ending with the Sunday which is nearest in time to 31 December
  • the week with 28 December in it (therefore the number of weeks in a given year is equal to the corresponding week number of 28 December)
  • 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 of the next year, otherwise in week 52 or 53.


The 53-week ISO week-numbering years can be described by any of the following equivalent definitions:
  • all years starting with Thursday, and leap years starting with Wednesday
  • all years ending with Thursday, and leap years ending with Friday
  • years in which 1 January or 31 December is a Thursday or in which both are Thursdays (usual case)
  • years with the dominical letter
    Dominical letter
    Dominical letters are letters A, B, C, D, E, F and G assigned to days in a cycle of seven with the letter A always set against 1 January as an aid for finding the day of the week of a given calendar date and in calculating Easter....

     D, DC or ED

All other week-numbering years have 52 weeks.

Examples

General examples:
  • 2005-01-01 is
  • 2005-01-02 is
  • 2005-12-31 is
  • 2007-01-01 is (both years 2007 start with the same day)
  • 2007-12-30 is
  • 2007-12-31 is
  • 2008-01-01 is (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
  • 2008-12-31 is
  • 2009-01-01 is
  • 2009-12-31 is (ISO year 2009 has 53 weeks, extending the Gregorian year 2009, which starts and ends with Thursday, at both ends with three days)
  • 2010-01-03 is

For 2009/2010 the ISO week-numbering year is three days into the next Gregorian year:
  • 2009-12-31 is
  • 2010-01-01 is
  • 2010-01-02 is
  • 2010-01-03 is

For 2008/2009 where the ISO week-numbering year is three days into the previous Gregorian year:
  • 2008-12-28 is
  • 2008-12-29 is
  • 2008-12-30 is
  • 2008-12-31 is
  • 2009-01-01 is

Weeks per month

The ISO standard does not define any association of weeks to months. A date is either expressed with a month and day-of-the-month, or with a week and day-of-the-week, never a mix.

Weeks are a prominent entity in accounting where annual statistics benefit from regularity throughout the years. Therefore in practice usually a fixed length of 13 weeks per quarter is chosen which is then subdivided into 5 + 4 + 4 weeks, 4 + 5 + 4 weeks or 4 + 4 + 5 weeks
4-4-5 Calendar
The 4–4–5 calendar is a method of managing accounting periods. It is a common calendar structure for some industries, such as retail, manufacturing and parking industry....

. The final quarter has 14 weeks in it when there are 53 weeks in the year.

When it is necessary to allocate a week to a single month, the rule for first week of the year might be applied, although ISO 8601 does not consider this case. The resulting pattern would be irregular. The only 4 months (or 5 in a long year) of 5 weeks would be those with at least 29 days starting on Thursday, those with at least 30 days starting on Wednesday, and those with 31 days starting on Tuesday.

Weeks per year

On average, a year has 53 weeks every 5.6338… years (= 7/(365.2425 - 52*7)).

The following 71 years in a 400-year cycle (add 2000 for current years) have 53 weeks. Years not listed have 52 weeks, years with February 29 are emphasized.
004, 009, 015, 020, 026, 032, 037, 043, 048, 054, 060, 065, 071, 076, 082, 088, 093, 099, 105, 111, 116, 122, 128, 133, 139, 144, 150, 156, 161, 167, 172, 178, 184, 189, 195, 201, 207, 212, 218, 224, 229, 235, 240, 246, 252, 257, 263, 268, 274, 280, 285, 291, 296, 303, 308, 314, 320, 325, 331, 336, 342, 348, 353, 359, 364, 370, 376, 381, 387, 392, 398.

Long years are 5 or 6 years apart, except that 296 and 303 are 7 years apart.
There are 13 28-year subcycles with 5 long years (53-week years) each, and 6 remaining long years in the remaining 36 years (the absence of leap days in 100, 200, and 300 interrupts the subcycles). The long 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 long years can be subdivided as follows:
  • 27 Gregorian leap years:
    • 13 leap years starting on Thursday
      Leap year starting on Thursday
      This is the calendar for any leap year starting on Thursday, January 1 , such as 1948, 1976, 2004, 2032 or 2060.Previous year | Next year...

       - Doomsday is Sunday, dominical letter is DC.
    • 14 leap years starting on Wednesday
      Leap year starting on Wednesday
      This is the calendar for any leap year starting on Wednesday, January 1 , such as 1936, 1964, 1992, 2020 or 2048.This kind of year has 53 weeks in the ISO 8601 week - day format.Previous year | Next yearMillenniumCenturyYear...

      , hence ending with Thursday) - Doomsday is Saturday, dominical letter is ED.
  • 44 common years starting, hence also ending, with Thursday
    Common year starting on Thursday
    This is the calendar for any common year starting on Thursday, January 1 . Examples: Gregorian years 1987, 1998, 2009, 2015 and 2026...

     - Doomsday is Saturday, dominical letter is D.


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.

Dates with fixed week number

Overview of dates with a fixed week number in any year other than a leap year starting on Thursday
Leap year starting on Thursday
This is the calendar for any leap year starting on Thursday, January 1 , such as 1948, 1976, 2004, 2032 or 2060.Previous year | Next year...

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


The day of the week for these days are related to Doomsday
Doomsday (weekday)
The Doomsday rule or Doomsday algorithm is a way of calculating the day of the week of a given date. It provides a perpetual calendar since the Gregorian calendar moves in cycles of 400 years....

 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.

Advantages

  • All weeks have an integral number of days (i.e. there are no fractional weeks).
  • All years have an integral number of weeks.
  • The date directly tells the weekday.
  • All week-numbering years start with a Monday and end with a Sunday.
  • When used by itself without using the concept of month, all week-numbering years are the same except that some years have a week 53 at the end.
  • The weeks are the same as used with the Gregorian calendar.
  • Dates represented as yyyy-Www-d or yyyyWwwd can be sorted as strings.

Disadvantages

Each equinox
Equinox
An equinox occurs twice a year, when the tilt of the Earth's axis is inclined neither away from nor towards the Sun, the center of the Sun being in the same plane as the Earth's equator...

 and solstice
Solstice
A solstice is an astronomical event that happens twice each year when the Sun's apparent position in the sky, as viewed from Earth, reaches its northernmost or southernmost extremes...

 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 spring equinoxes on 2004-W12-7 and 2010-W11-7.

It does not replace the Gregorian calendar
Gregorian calendar
The Gregorian calendar, also known as the Western calendar, or Christian calendar, is the internationally accepted civil calendar. It was introduced by Pope Gregory XIII, after whom the calendar was named, by a decree signed on 24 February 1582, a papal bull known by its opening words Inter...

, which it uses to define the new year day (Week 1 Day 1). However, it could be defined without reference to Gregorian. One needs at most a defined start and a table of year-lengths over the 400-year cycle.

Not all parts of the world have a work week that begins with Monday. For example, in some Muslim countries, the work week may begin on Saturday, while in Israel it may begin on Sunday. In the US the work week is often defined to start on Monday, although the week itself is usually considered to start on Sunday.

Calculating the week number of a given date

One can calculate the week number of any date given its ordinal date
Ordinal date
An ordinal date is a calendar date typically consisting of a year and a day of year ranging between 1 and 366 , though year may sometimes be omitted...

 (i.e. position within the year) and its day of the week. If one does not know the ordinal date, it can be computed by any of several methods; perhaps the most direct is a table such as the following.

To the day of: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Add: 0 31 59 90 120 151 181 212 243 273 304 334
For leap years: 0 31 60 91 121 152 182 213 244 274 305 335
See the Discussion page for accurate algorithms. The algorithm below does not work.

Method: Using ISO weekday numbers (running from 1 for Monday to 7 for Sunday), subtract the weekday from the ordinal date, then add 10. Divide the result by 7. Ignore the remainder; the quotient equals the week number. If the week number thus obtained equals 0, it means that the given date belongs to the preceding (week-based) year. If a week number of 53 is obtained, one must check that the date is not actually in week 1 of the following year.

Example: Friday 26 September 2008
  • Ordinal day: 244 + 26 = 270
  • Weekday: Friday = 5
  • 270 - 5 + 10 = 275
  • 275 / 7 = 39 plus an irrelevant fraction
  • Result: Week 39

Calculating a date given the year, week number and weekday

This method requires that one know the weekday of 4 January of the year in question. Add 3 to the number of this weekday, giving a correction to be used for dates within this year.

Method: Multiply the week number by 7, then add the weekday. From this sum subtract the correction for the year. The result is the ordinal date, which can be converted into a calendar date using the table in the preceding section. If the ordinal date thus obtained is zero or negative, the date belongs to the previous calendar year; if greater than the number of days in the year, to the following year.

Example: year 2008, week 39, Saturday (day 6)
  • Correction for 2008: 5 + 3 = 8
  • (39 * 7) + 6 = 279
  • 279 - 8 = 271
  • Ordinal day 271 of a leap year is day 271 - 244 = 27 September
  • Result: 27 September 2008

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.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK