Re: Day of week question

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Day of week question
Дата
Msg-id Pine.LNX.4.44.0310051357110.2745-100000@peter.localdomain
обсуждение исходный текст
Ответ на Day of week question  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-hackers
Michael Meskes writes:

> mm=# select to_char('1000/01/01'::date,'D');
>  to_char
>  ---------
>  4
> (1 row)
>
> Thus we believe 1000/1/1 is a Wednesday. cal says:

> Thus 1000/1/1 is a Monday. Is this a bug in cal? Or do we produce the
> wrong output? Or do I simply misread the output?

cal takes into account the change from the Julian to the Gregorian
calendar.  PostgreSQL assumes that the Gregorian calendar is valid for all
times in the past.  So both answers are correct given those assumptions.

-- 
Peter Eisentraut   peter_e@gmx.net



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

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: Index/Function organized table layout
Следующее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: Day of week question