Those are unrelated questions.....day of week has nothing to with the start
of a week.
>From the standard strftime man page which has been around for decades.
%w The day of the week as a decimal, range 0 to 6, Sunday
being 0. See also
%u.
%W The week number of the current year as a decimal number,
range 00 to 53,
starting with the first Monday as the first day of week 01.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Denis Burke
Sent: Wednesday, June 19, 2013 11:21 AM
To: [email protected]
Subject: [sqlite] First Day of Week Inconsistency
The built-in function strftime properly (imho) responds to the '%w' command
for day of week with Sunday as day 0.
e.g. - strftime ('%w','2013-06-19')
-> 3
But the built-in function for returning week of the year treats weeks as
though they begin on Monday, not Sunday:
e.g.
strftime ('%W','2013-06-19')
-> 24
strftime ('%W','2013-06-17')
-> 24
strftime ('%W','2013-06-16')
-> 23
It seems to me these useful functions are inconsistent. Is it possible to
modify %W to treat Sunday as the first day of the week?
Thanks,
Denis Burke
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users