
ISO WEEK NUMBER ISO
Under the ISO standard, week 1 will ' always have at least 4 days. ' ' An ISO week number may be between 1 and 53. ' Therefore, the first two days of 2000, Jan-1 and Jan-2, fall into week 52 of 1999. In 2000, the ' first Thursday was Jan-6, so week 1 begins the preceding Monday, or Jan-3. Under the ISO standard, weeks always begin on a Monday. Instead, they ' will be in week 52 of the preceding year! For example, the year 2000 began on ' Saturday. ' ' While this provides some standardization, it can lead to unexpected results - ' namely that the first few days of a year may not be in week 1 at all.

' The first week of a year is that week which contains the first Thursday of the year, ' or, equivalently, contains Jan-4. ' ' Under the ISO standard, a week always begins on a Monday, and ends on a Sunday. Of course, compliance with these standards is ' entirely voluntary, so your business may or may not use the ISO definitions. This provides some ' standardization for "week numbers". But the year 2004 does have a week 53, from Monday, 27-Dec, through Friday, 31-Dec.įunction ISOWeekNum(AnyDate As Date) As Long Week 52 begins on Monday, 25-Dec, and ends on Sunday, 31-Dec.

For example, the year 2000 does not have a week 53. Unlike absolute week numbers, not every year will have a week 53. If 1-Jan falls on a Friday, Saturday, or Sunday, the first few days of the year are defined as being in the last (52nd or 53rd) week of the previous year. Under the ISO standard, week 1 will always have at least 4 days. Therefore, the first two days of 2000, Jan-1 and Jan-2, fall into week 52 of 1999.Īn ISO week number may be between 1 and 53. In 2000, the first Thursday was Jan-6, so week 1 begins the preceding Monday, or Jan-3. Instead, they will be in week 52 of the preceding year! For example, the year 2000 began on Saturday. While this provides some standardization, it can lead to unexpected results - namely that the first few days of a year may not be in week 1 at all. The first week of a year is that week which contains the first Thursday of the year, or, equivalently, contains Jan-4. Under the ISO standard, a week always begins on a Monday, and ends on a Sunday.

Of course, compliance with these standards is entirely voluntary, so your business may or may not use the ISO definitions. This provides some standardization for "week numbers". The International Organization for Standardisation (ISO), based in Switzerland, issued Standard 8601 - Representation Of Dates And Times, in 1988. The following discussion is from Chip Pearson?s web site: For more on ISO week numbers and some of the strange results from the ISO standard J, read on ? Either function can be used in any VB/VBA application.
ISO WEEK NUMBER CODE
The base code for both functions was written by John Green and is posted on Chip Pearson?s web site. strISOWeekNum computes the same number but passes it back as a string in one of several user-selectable formats. ISOWeekNum is a function of Type Long that computes the ISO week number for any date. Computes ISO week number using either Long or String type functions
