Backport #3327
closedDate.parse returns incorrect result when text date delimited with "_"
Description
=begin
Date.parse('01_01_2010')
=> #<Date: 2010-05-01 (4910635/2,0,2299161)>
ruby 1.9.2dev (2010-05-13 revision 27783) [x86_64-darwin10.3.0]
=end
Updated by matz (Yukihiro Matsumoto) almost 14 years ago
=begin
Hi,
In message "Re: [ruby-core:30338] [Backport #3327] Date.parse returns incorrect result when text date delimited with "_""
on Fri, 21 May 2010 06:12:23 +0900, Ralph Wagenet redmine@ruby-lang.org writes:
|Date.parse('01_01_2010')
|=> #<Date: 2010-05-01 (4910635/2,0,2299161)>
|
|ruby 1.9.2dev (2010-05-13 revision 27783) [x86_64-darwin10.3.0]
First, Date.parse does not support the date strings delimited by "_".
Second, Date.parse ignores trailing garbage.
Third, Date.parse parses single number as a day of the current month,
so that "01_01_2010" is considered as "01" which means the first day
of the current month (May 2010).
matz.
=end
Updated by nobu (Nobuyoshi Nakada) almost 14 years ago
- Status changed from Open to Rejected
=begin
=end