From: Yukihiro Matsumoto Date: 2008-12-22T21:42:10+09:00 Subject: [ruby-core:20785] Re: [Bug #634] Time parsing works in 1.8 but not 1.9 In message "Re: [ruby-core:20779] Re: [Bug #634] Time parsing works in 1.8 but not 1.9" on Mon, 22 Dec 2008 16:36:53 +0900, "Roger Pack" writes: | |>> This is an intentional change (r12859). |> |> Can I regard this issue as rejected? | |Seems somewhat surprising to me that |Date::parse('06/21/95') | |doesn't parse, though I suppose that's better than what 1.8.x currently does: |irb(main):004:0> Date.parse("08/21/97").to_s |=> "0097-08-21" | |Which is definitely bad :) "dd/dd/dd" format itself is very culture dependent and ambiguous. It is yy/mm/dd in Japan (and other countries), mm/dd/yy in USA, dd/mm/yy in European countries, right? In some cases, you can tell them by accident, but we should not rely on luck in general cases. I believe that is the reason parsing this format is disabled in 1.9. |Also should I file a feature request to change Time.parse to raise on |failed parse instead of returning Time.now [as you can't currently |determine if a time parsed successfully or not--at least not easily]. It seems reasonable. You can file a feature request for this issue. matz.