in Pharo1.0 = comparand "comparand conforms to protocol DateAndTime, or can be converted into something that conforms." | comparandAsDateAndTime | self == comparand ifTrue: [ ^ true ]. ----> this one is absent: (comparand isKindOf: self class) ifFalse: [ ^ false ]. [ comparandAsDateAndTime := comparand asDateAndTime ] on: MessageNotUnderstood do: [ ^ false ]. ^ self offset = comparandAsDateAndTime offset ifTrue: [ self hasEqualTicks: comparandAsDateAndTime ] ifFalse: [ self asUTC ticks = comparandAsDateAndTime asUTC ticks ] Now I would love to understand what is slower than that :)
Hi, Chris Muller has just told me that I am dead wron on the equality issue, so I stand corrected. He will post soon.
On the above, this is a bit of archeology - the Month and Week classes were introduced into Squeak before I added the ANSI Chronology classes and the whole Timespan hierarchy.
I could only get the chronology into the image by preserving compatibility.
It could probably be refactored now.
Please send us some code because this would be good to have it straight now. :)
Brent
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project