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