Dates
Norberto Manzanos
nmanzanos at sion.com
Fri Jan 28 17:36:59 UTC 2005
Hi.
I'm upgrading some stuff from 3.5 to 3.7 and I found some modification in
Date implementation.
I had done some modifications in Date class to avoid ambiguities such as
(Date newDay:1 month:12 year:1) = (Date newDay:1 month:12 year: 2001)
true
and I'm happy to find that now this is fixed. Now historical dates exists.
But I notice that
(Date year:1 month:12 day:1) julianDayNumber 1721760
(Date year:0 month:12 day:1) julianDayNumber 1721395
(Date year:-1 month:12 day:1) julianDayNumber 1721029
That's wrong, since year 0 doesnt' exists. The second line is returning the
julianDayNumber of year -1 (A.C)
and the the third, the day of year -2.
I have adapted my class that supported non ambigous dates (and other
features) to correct this, overriding the creation method to sum 1 one
year, but I think it must be corrected in Date class itself. I tried, but I
found it hard, at a first glance.
Don't you think this may be fixed?
Cheers
Norberto
More information about the Squeak-dev
mailing list
|