| From: | Bruno Wolff III <bruno(at)wolff(dot)to> | 
|---|---|
| To: | PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org> | 
| Subject: | Re: BUG #1094: date_part('week') bug | 
| Date: | 2004-03-04 18:12:31 | 
| Message-ID: | 20040304181231.GA22156@wolff.to | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
On Thu, Mar 04, 2004 at 13:56:42 -0400,
  PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org> wrote:
> 
> The following bug has been logged online:
This isn't a bug. Weeks that span years are treated as part of the year
in which Thursday of that week lies.
> 
> Bug reference:      1094
> Logged by:          xterm
> 
> Email address:      xterm(at)linuxnews(dot)pl
> 
> PostgreSQL version: 7.3.4
> 
> Operating system:   RH Fedora
> 
> Description:        date_part('week') bug
> 
> Details: 
> 
> Some late dates give in some years wrong 
> date_part('week')
> 
> examples:
> 
> select date_part('week', '2003-12-30'::date);
>  date_part
> -----------
>          1
> (1 row)
> 
> select date_part('week', '1997-12-29'::date);
>  date_part
> -----------
>          1
> (1 row)
> 
> but:
> 
> select date_part('week', '1998-12-31'::date);
>  date_part
> -----------
>         53
> (1 row)
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Creager | 2004-03-05 03:46:19 | Re: BUG #1094: date_part('week') bug | 
| Previous Message | PostgreSQL Bugs List | 2004-03-04 17:56:42 | BUG #1094: date_part('week') bug |