From: | Jim Mercer <jim(at)reptiles(dot)org> |
---|---|
To: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
Cc: | "'lockhart(at)fourpalms(dot)org'" <lockhart(at)fourpalms(dot)org>, Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, Nicolai M?kleby <nicolai(dot)mokleby(at)labmed(dot)uio(dot)no>, Hackers List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: Week number |
Date: | 2001-03-14 17:00:38 |
Message-ID: | 20010314120038.Y4368@reptiles.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 14, 2001 at 04:54:54PM +0100, Zeugswetter Andreas SB wrote:
> > Unix day-of-week starts on Sunday, not Monday, which is what
> > date_trunc('dow',...) returns. Presumably this is modeled on the
> > traditional notion (at least in the US; I suspect this is true in most
> > European countries at least) of Sunday being "the first day of week".
>
> Germany and Austria have Monday as first day of week, I think most of
> Europe also.
it is all relative.
most western calendars that i have seen show "Sun Mon Tue Wed Thu Fri Sat".
the concept of "first" day of week is a bit muddied.
many christian-influenced places would consider Sunday to be the "first"
day of the week, but monday being the "first" business day of the week.
i have seen calendars which use "Mon Tue Wed Thu Fri Sat Sun", and i have
worked with people where saturday was the first day of business. and also
places where sunday is the first day of business.
so, suffice to say, there is no "proper" first day of the week.
as such, the unix day of week pegs sunday as day 0, your code should just
use that index. since almost all cultures have now adapted to a 7 day week
and a 365 day year, there shouldn't bee too much confusion.
--
[ Jim Mercer jim(at)pneumonoultramicroscopicsilicovolcanoconiosis(dot)ca ]
[ Reptilian Research -- Longer Life through Colder Blood ]
[ aka jim(at)reptiles(dot)org +1 416 410-5633 ]
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-03-14 17:13:32 | Re: AW: Shutdown term |
Previous Message | Thomas Swan | 2001-03-14 16:44:00 | Re: AW: Shutdown term |