Take the two following examples:
Date.parse("02/20/2009")
Date.parse("02-20-2009")
In the first example, the order is assumed to be MM DD YYYY, but in the second example an error is raised because (I'm assuming) it tries to parse it as DD MM YYYY.
Why?
"02/20/2009" is the date representation only in en_US locale. "02-20-2009" is not, thus assumed to follow a standard. There are two popular standards, used most everywhere except for the US: DD-MM-YYYY or the ISO 8601, which is YYYY-MM-DD.
http://en.wikipedia.org/wiki/File:Date.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With