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 <sebastian@flowingconcept.com> 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 <sven@stfx.eu> wrote:
On 03 Jan 2014, at 18:50, Sebastian Sastre <sebastian@flowingconcept.com> 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/