%W seems to be what is known as "ISO dates" (week starts on Monday),
except that
strftime(as.POSIXlt(as.Date("2005-01-01")), "%U")
[1] "00"
should be week 53, 2004 according to my printed calendar, and emacs
calendar-mode too.
That's nothing like as easy, as it is not well-defined.
The POSIX definition is
%U
Replaced by the week number of the year as a decimal number [00,53].
The first Sunday of January is the first day of week 1; days in the
new year before this are in week 0.
%W
Replaced by the week number of the year as a decimal number [00,53].
The first Monday of January is the first day of week 1; days in the
new year before this are in week 0.
so it is doing what it is documented to do. I'd take POSIX as more
definitive than Emacs ....