Re: year and weeknumbers (proposal included)

From: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
To: joost(at)snow(dot)nl, pgsql-bugs(at)postgresql(dot)org
Subject: Re: year and weeknumbers (proposal included)
Date: 2003-01-30 14:15:14
Message-ID: 3E393372.20700@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

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

joost(at)snow(dot)nl 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>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruno Wolff III 2003-01-30 14:28:55 Re: year and weeknumbers (proposal included)
Previous Message Jose Manuel 2003-01-30 13:49:09 Windows Ports