Re: Re: Week number

Поиск
Список
Период
Сортировка
От Jim Mercer
Тема Re: Re: Week number
Дата
Msg-id 20010314120038.Y4368@reptiles.org
обсуждение исходный текст
Ответ на AW: Re: Week number  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Ответы Re: Re: Week number  (Peter Eisentraut <peter_e@gmx.net>)
Список 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@pneumonoultramicroscopicsilicovolcanoconiosis.ca ]
[          Reptilian Research -- Longer Life through Colder Blood          ]
[ aka                        jim@reptiles.org              +1 416 410-5633 ]


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: AW: Shutdown term
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: pgmonitor patch for query string