The WEEK function with
the V descriptor reads a SAS date value and returns the week number.
The number-of-the-week is represented as a decimal number in the range
01–53. The decimal number has a leading zero and a maximum
value of 53. Weeks begin on a Monday, and week 1 of the year is the
week that includes both January 4th and the first Thursday of the
year. If the first Monday of January is the 2nd, 3rd, or 4th, the
preceding days are part of the last week of the preceding year. In
the following example, 01jan2006 and 30dec2005 occur in the same week.
The first day (Monday) of that week is 26dec2005. Therefore,
week('01jan2006'd, 'v')
and
week('30dec2005'd,
'v')
both return a value of 52.
This means that both dates occur in week 52 of the year 2005.