From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Michael Meskes <meskes(at)postgresql(dot)org> |
Cc: | PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Day of week question |
Date: | 2003-10-05 11:59:26 |
Message-ID: | Pine.LNX.4.44.0310051357110.2745-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2003-10-05 12:03:27 | Re: Day of week question |
Previous Message | Mike Mascari | 2003-10-05 11:11:14 | Re: Index/Function organized table layout |