> On 18 Oct 2015, at 17:50, Torsten Bergmann <[email protected]> wrote: > > '9.7.2015' asDate returns the 7th of September, I would have expected 9th of > July
Hmm, this particular case (any case involving two numbers <= 12) is non-deterministic when no expected pattern is given. Smalltalk was written in the US, so they chose their date format as default. > because in Date readFrom: comment it is stated: > > readFrom: aStream > "Read a Date from the stream in any of the forms: > <day> <month> <year> (15 April 1982; 15-APR-82; 15.4.82; > 15APR82) > <month> <day> <year> (April 15, 1982; 4/15/82) > <year>-<month>-<day> (1982-04-15) (ISO8601)" > > According to this the order day, month, year with a $. as separator should be > valid. > > When I try '15.4.82' asDate als does not work, it gives an error that the > month is exceeded with 15... So by default it goes for the American format, month first. From that perspective it is correct. I did not look at the implementation, but I think there is no real universal solution. > Looks like this is not correctly implemented/backed up by tests. Or the > comment is just wrong. > Should I open an issue? > > Thanks > T. > > > >
