Chris Cunningham
2018-10-17 14:35:46 UTC
Hi.
Following a thread in Pharo where two dates that are equal weren't usable
in a Dictionary as keys, I wondered if the same thing is true in Squeak.
It is, unfortunately. I can't use the same code as given in the Pharo
example (we don't have a #translateToUTC), but equivalent code shows the
issue:
d1 := DateAndTime now asDate.
d2 := Date today.
d1 = d2. "true"
d1 hash = d2 hash. "false"
I'll get around to fixing the hash in the next day or so, when I get a
chance to figure out how.
Thanks,
cbc
Following a thread in Pharo where two dates that are equal weren't usable
in a Dictionary as keys, I wondered if the same thing is true in Squeak.
It is, unfortunately. I can't use the same code as given in the Pharo
example (we don't have a #translateToUTC), but equivalent code shows the
issue:
d1 := DateAndTime now asDate.
d2 := Date today.
d1 = d2. "true"
d1 hash = d2 hash. "false"
I'll get around to fixing the hash in the next day or so, when I get a
chance to figure out how.
Thanks,
cbc