Project

General

Profile

Actions

Bug #6818

closed

Incorrect Date.parse results

Bug #6818: Incorrect Date.parse results

Added by babak (Babak B) over 13 years ago. Updated over 13 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0]
Backport:
[ruby-core:46892]

Description

Since this is a standard library and I couldn't find a dedicated page for the Date module

require 'time

Date.parse '07/31/2012'
ArgumentError: invalid date
from (pry):3:in `parse'

In the United States, MM/DD/YYYY is perhaps the most common way to write dates. I found somewhere in prior posts suggestions to convert to Euro style which may alson include DD/MM/YYYY but that is not correct for US. There should at least be a way to choose the region, it can not always be deduced from syntax of date alone.

Updated by shyouhei (Shyouhei Urabe) over 13 years ago Actions #1 [ruby-core:46893]

  • Priority changed from 5 to 3

Pissed off.

I hereby propose to deprecate this feature.

Updated by tadf (tadayoshi funaba) over 13 years ago Actions #2 [ruby-core:46998]

  • Assignee set to tadf (tadayoshi funaba)
  • Status changed from Open to Rejected

it is not a bug.
us is minority.
i think we should just ignore the case, so far.

Actions

Also available in: PDF Atom