Hello 2012/10/29 Chris Cunningham <[email protected]>
> you are aware that both of those dates are correct, just in different > parts of the world? Of course, the first could be 1 March, 2012 just > a easily as 3 January, 2012. > To me system should not try to be too much clever. It should use concrete strong format to parse date in String>>asDate. Really who needs such magic behaviour? How I can learn what format #asDate wants? Simplest way is execute on some example (which I do). And I was try format dd.MM.yyyy for current date 28.10.2012. And then I was use my understanding in my code for parsing date. But for begin of next month my code will broken because "'01.11.2012' asDate" returns 11 january 2012 instead of november which should be consistent to parsing '28.10.2012'. So to me it is totally crappy behaviour which leads to many trouble > > If you make it consistent, which way are you leaning towards? Maybe > more specific asXXXDate keywords to indicate which one you want? > > -Chris > I want #asDate uses only strong (default) format for parsing date and throws error when given string not satisfied it. For explicit parsing date from concrete format I think Camillo Bruni work at stamp port. Very nice library https://github.com/jeremyw/stamp#readme Best regards, Denis
