Make Date#parse assume a US format instead of an EU format

Viewed 5975

With 1.9.2p0, Date#parse assumes an UE format. Check out format.rb, line: 1042 if you don't believe me.

Anyways, how can I make it assume a US format, so that:

> Date.parse("10/4/2010")
 => Mon, 04 Oct 2010

Instead of April 10th.

I've tried this:

class Date
  def _parse_eu(str,e)
    _parse_us(str,e)
  end
end

but no luck. Any other ideas?

2 Answers
Related