On Thu, 16 Feb 2017, Ignacio Diaz-Emparanza wrote:
OK. I understand. Good to know that gretl is doing well.
It is interesting that in this url the calendar for Spain in 1700 is
different from the US calendar.
I assume the "cal" code maybe is doing some adjustments also for some days in
1756 (and also some other years in the XVIII century). In particular the
gretl function 'weekday' produces negative values for some days in may 1756
(they should be values only from 0(sunday) to 6(saturday)).
<script>
nulldata 1500
setobs 7 1755-01-01 --time-series
series d = weekday($obsmajor,$obsminor,$obsmicro)
</script>
Hmm, not so good. Actually the day-of-week code is taken from Uspensky
and Heaslet's Elementary Number Theory (1939) and it assumes a
Gregorian calendar, so (even with the bug you note fixed) it won't
give days of the week as they appeared on actual calendars prior to
the "cutover" from Julian to Gregorian.
I'm not sure what to do about this. One option would be to
back-project the Gregorian calendar consistently ("proleptic Gregorian
calendar"), and never mind what calendars actually said in the old
days (they would differ across countries anyway). That would, for
example, make 1700 not a leap year, though it was on the calendar in
force in England at the time. ISO 8601 has it that all dates must be
consecutive (unlike England in 1752 when Wednesday the 2nd of
September was followed by Thursday the 14th) so maybe we should make
this change.
Any other thoughts on this?
Allin