[squeak-dev] ST80 Date classes available on squeaksource.com (was: Date today versus DateAndTime today)
David T. Lewis
lewis at mail.msen.com
Sat Dec 11 22:00:11 UTC 2021
On Wed, Dec 08, 2021 at 10:21:43PM +0000, Bernhard Pieber wrote:
> Hi everyone,
> I am quite puzzled that the following answers false:
> DateAndTime today asDate = Date today.
Class Date is modeled as a Timespan which can be problematic.
Can two Dates be the same if their timespans begin at different
times? Is a Date really 24 hours long?
Squeak archeologists may be interested to comparing our current
system to the earlier implementation, in which Date was modeled
as a Magnitude.
It turns out that the earlier classes circa Squeak 3.6 can be
easily renamed and loaded into today's Squeak trunk, which
allows side-by-side comparison to our current Chronology classes.
I did the renaming (Date -> ST80Date, Time -> ST80Time, etc), added
a few tests to make sure that the old classes instantiated as
expected, and put the result on SqueakSource here:
I preserved method stamps as much as possible and ran a FixUnderscores
on the 'ST80Date' package, but otherwise these classes are renamed
copies of the originals, and they function just as they did in
More information about the Squeak-dev