[squeak-dev] The Inbox: Chronology-Core-cmm.13.mcz

David T. Lewis lewis at mail.msen.com
Thu Oct 18 00:43:32 UTC 2018


If I am reading this right, it says that we can test for
"self start = comparand start" if and only if both of the two Timespans
have no timezone information, otherwise we need to use #hasEqualTicks:
to compare the two start values for the two durations.

I'm not sure if there is an optimization available for the case of the
two Timespans both having timezone information, but aside from that
the change looks right to me.

Dave

On Wed, Oct 17, 2018 at 09:04:29PM +0000, commits at source.squeak.org wrote:
> Chris Muller uploaded a new version of Chronology-Core to project The Inbox:
> http://source.squeak.org/inbox/Chronology-Core-cmm.13.mcz
> 
> ==================== Summary ====================
> 
> Name: Chronology-Core-cmm.13
> Author: cmm
> Time: 17 October 2018, 4:04:08.832696 pm
> UUID: 60718249-84a8-4dc2-aa94-4ba5c8e5addc
> Ancestors: Chronology-Core-tcj.12
> 
> Fix DateAndTime today asDate = Date today even when not in GMT.
> 
> =============== Diff against Chronology-Core-tcj.12 ===============
> 
> Item was changed:
>   ----- Method: Timespan>>= (in category 'ansi protocol') -----
>   = comparand
>   	^ self class = comparand class 
> + 		and: [((self noTimezone and: [comparand noTimezone])
> - 		and: [((self noTimezone or: [ comparand noTimezone ])
>   			ifTrue: [ self start hasEqualTicks: comparand start ]
>   			ifFalse: [ self start = comparand start ])
>   		and: [ self duration = comparand duration ] ]
>   .!
> 
> 


More information about the Squeak-dev mailing list