Re: BUG #1217: wrong date->number of week conversion - Mailing list pgsql-bugs

From Jean-Luc Lachance
Subject Re: BUG #1217: wrong date->number of week conversion
Date
Msg-id 411CDD5E.9010704@sympatico.ca
Whole thread Raw
In response to Re: BUG #1217: wrong date->number of week conversion  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #1217: wrong date->number of week conversion  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
This look like it would be nice to have it configurable.

first_day_of_the_week
first_day_of the_year



Tom Lane wrote:

> "PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
>
>>Frankly speaking I don`t know the adequate calendar ISO norm  in detail, but
>>the last days of year shouldn`t be counted as F_I_R_S_T week of that year. I
>>expected PostgreSQL rather to return 2003-53-29.
>
>
> You are mistaken.
>
> The ISO week is defined as Mon-Sun where week 1 of a year is the week
> containing the year's first Thursday.  Don't ask me *why* it's defined
> that way, but it is.  2004's first Thursday is Jan 1, so that week
> extends from 2003-12-29 to 2004-01-04.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgresql 8.0.0 beta1
Next
From: Andras Kutrovics
Date:
Subject: PostgreSQL 8.0