Yeah Sven, I know timezones can be hell.

Actually for me this isn't an issue as already ported my code with asDate and 
asTime.

What worries me is the thinking behind that omission 

Why?

Because you don't know where it will bite you next.

But it will

And it wont be intuitive




On Jan 3, 2014, at 4:20 PM, Sven Van Caekenberghe <[email protected]> wrote:

> I can’t defend the API choice.
> 
> But consider this: contrary to the name, a DateAndTime is much more that just 
> a Date + a Time, it has a timezone offset and fractional seconds. That could 
> be reason why there are #asDate and #asTime as conversion methods instead of 
> #date and #time as accessors. On the other hand, there are lots of other 
> accessors for all components. Maybe that is why #date and #time were not 
> implemented: you would expect taking the date and time from a dateAndTime and 
> composing them again would yield the original object, but that would not work.
> 
> On 03 Jan 2014, at 19:03, Sebastian Sastre <[email protected]> 
> wrote:
> 
>> yeah is what I'm using now but the 'as' means conversion while the #date and 
>> #time suggest delegating access to the other guy
>> 
>> returning to the question.. is that omission intentional then?
>> 
>> I mean..
>> 
>> There are counter intuitive things that are cool.
>> 
>> This isn't one of those.
>> 
>> This one sounds a lot against intuition for no good reason
>> 
>> sebastian
>> 
>> o/
>> 
>> 
>> 
>> 
>> 
>> On Jan 3, 2014, at 3:55 PM, Sven Van Caekenberghe <[email protected]> wrote:
>> 
>>> 
>>> On 03 Jan 2014, at 18:50, Sebastian Sastre <[email protected]> 
>>> wrote:
>>> 
>>>> How are we going to tell that our DateAndTime does not understand #date 
>>>> nor #time? (and keep our face straight)
>>>> 
>>>> Sorry for the drama but hey... the raison d'être, its meaning, the purpose 
>>>> in the life of a DateAndTime is to make you able to send messages about 
>>>> date and time :D
>>>> 
>>>> How come that the most basic ones are being omitted?
>>>> 
>>>> Am I missing something?
>>> 
>>> #asDate and #asTime ?
>>> 
>>>> sebastian
>>>> 
>>>> o/
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
> 
> 

Reply via email to