Counting weeks is a very special things because it is not the same in all countries. As far as I have been told Polish people count weeks not the way Austrians do it.
On my calendar it says that the first week of the year starts on January 1st. As far as I remember other countries such as Poland start to when the first full week starts.
Maybe we should verify and document this somewhere.
Regards,
Hans
[EMAIL PROTECTED] wrote:
hi,
last year (2002) the date december 31st is in week 1 of 2003.
it is not possible to get this out of a date-column using EXTRACT or
to_char. to_char( '2002-12-31', 'WW' ) returns 1, and
to_char( '2002-12-31', 'YYYY' ) returns 2002 (as expected)!
the format for retrieving the year with respect to week-numbering
could be something like IY, IYY, IYYY, IYYYY.
to_char( '2002-12-31', 'IYYYY' ) returns 2003.
regards,
Joost Helberg
--
*Cybertec Geschwinde u Schoenig*
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/1/913 68 09; +43/664/233 90 75
www.postgresql.at <http://www.postgresql.at>, cluster.postgresql.at <http://cluster.postgresql.at>, www.cybertec.at <http://www.cybertec.at>, kernel.cybertec.at <http://kernel.cybertec.at>
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])