Richard Frith-Macdonald schrieb:
On 13 Nov 2006, at 21:09, David Ayers wrote:
--- /tests/testsuite/trunk/base/NSDate/create.m 2006/11/13
I'm not sure about this change to the test suite...
Does this imply that constructing an NSDate with an ISO date without
specifing the time is invalid? I'm afraid that may break some adaptor
implementations where the database fields differentiate between dates
and timestamps.
Yes it does mean that it's invalid ... if you want to create a date
from a string without the timestamp then the format should not contain
a timestamp part.
Such code would not work on MacOS-X (or with the base library with the
appropriate bugfix). The method initWithString... is explicitly
documented to say that the string must match the format.
Well I guess that's a unfortunate result of an evolving API. It implies
that the date class of an EOAttribute must be an NSCalendarDate (or
subclass thereof) since NSDate does not have the API to specify a
format. I'm almost certain (but just haven't found to verify) that
OPENSTEP allowed ISO dates without timestamps for NSDate class. But oh
well...