Re: day of week - Mailing list pgsql-hackers

From Karel Zak
Subject Re: day of week
Date
Msg-id Pine.LNX.3.96.1000605231715.67B-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Re: day of week  (Don Baccus <dhogaza@pacifier.com>)
Responses Re: day of week
List pgsql-hackers
> >For to_char() I use POSIX definition of 'tm' where week start on Sunday.
> > 
> >Is it right? (Exuse me, I see archive, but without some effect...).
> >
> >Or we will support both styles?
> 
> to_char() gives the same answer with Oracle, as it is supposed to
> and as you intended it to.
> 
> I personally don't find it all that disconcerting that the two give
> different answers.  Change the old, PG way and lots of old code
> is likely to break.  Change to_char() and the desired compatibility
> with Oracle breaks.
It is a Solomon's answer :-), but well. I agree. 

> I think it boils down to needing good documentation ???
OK, I add it to to_char() and to date_[ trunc | dart ].


I'm just now working on 'week' support to date_trunc().

The date_part() say that monday is a first day, to_char that it is second day,
and what will say date_trunc()? --- how date is a week start, 'monday' or 
'sunday' date ?
Comments?

(I vote for 'sunday' like first day.)                Karel





pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: day of week
Next
From: Tom Lane
Date:
Subject: Re: day of week