On Feb 1, 2014, at 12:26 PM, Sven Van Caekenberghe <[email protected]> wrote:

> Sebastian,
> 
> In my 3.0 image
> 
> | today |
> today := Date today.
> (today translateTo: 2 hours) = today. 
> 
> => false
> 

Yeah, here too

> But what are you trying to accomplish ?

Detect the most simple equality in the most conventional way. A true when two 
dates refers to the same date of the calendar


> Dates are a bit ambiguous: my Feb 1st and your Feb 1st, in one sense they are 
> the same, refer to the same date, but in another sense, yours started at a 
> different point in time, right ? So are they equal ?

Well dates are the same, that’s the convention isn’t it? Localisation and time 
is what's different there.

If you want to have time involved in the equation the logic step given our 
options is that you use DateAndTime

So, again…

Is this a bug or a feature?

1. Feature: our convention is injecting time in dates so we are injecting an 
incompatibility with intuition in exchange of a surprising precision*

2. Bug: Date #=  should not compare start

*a precision that is redundant because DateAndTime also have the #translateTo: 
feature 


> Sven
> 
> On 01 Feb 2014, at 14:01, Sebastian Sastre <[email protected]> 
> wrote:
> 
>> Can somebody please clarify if this is a bug or feature?
>> 
>> thanks
>> 
>> 
>> 
>> 
>> On Jan 31, 2014, at 9:03 PM, Sebastian Sastre <[email protected]> 
>> wrote:
>> 
>>> self assert: Date today = Date today.
>>> 
>>> today := Date today translateTo: 2 hours.
>>> self assert: today = Date today
>>> 
>>> Is this right?
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

Reply via email to