Subject | Re: extract(week from d) |
---|---|
Author | lacakus |
Post date | 2006-11-30T13:30:22Z |
> but as Helen pointed out, you have to tell your requirements*exactly*.
> E.g. 1-1-2006 is Sunday, so according to iso standardI prefer following ISO 8601 standard, so 2006-01-01 belongs to last
> it actually belongs to last week of 2005. What restul do you expect
> this week-function to return ?
week of 2005 and First week of 2006 begins with 2006-01-02.
Exactly so as in my paper-calender on my desk :-)
PostgreSQL documentation says:
By definition (ISO 8601), the first week of a year contains January 4
of that year. (The ISO-8601 week starts on Monday.) In other words, the
first Thursday of a year is in week 1 of that year.
-Laco.