First Day of the Week Affects Calendar Week
First Day of the Week Affects Calendar Week

First Day of the Week Affects Calendar Week

The
%U
and
%W
commands set the first day of the week. The week numbering starts at the beginning of the year with Week 01 representing the first full week of the year. Any day(s) before that established first day of the week are part of the Week 00. The following examples show how setting different days as the first day of the week affect the calendar week.
The
%U
and
%W
commands determine the numbering for all weeks in the year.
January, 2005 with Week 00
Set Sunday as the first day of the week using the
%U
command. In this example, notice that Saturday, January 1st is Week 00 and Sunday, January 2nd begins Week 01.
January, 2005 with Week 00
Set Monday as the first day of the week using the
%W
command. In this example, notice that Saturday, January 1st and Sunday, January 2nd are Week 00 and Monday, January 3rd begins Week 01.
January, 2006 without Week 00
Set Sunday as the first day of the week using the
%U
command. Since 2006 begins on a Sunday, there is no Week 00 in this example.