Project

General

Profile

Backport #3327

Date.parse returns incorrect result when text date delimited with "_"

Added by rwagenet (Ralph Wagenet) over 9 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
[ruby-core:30338]

Description

=begin
Date.parse('01_01_2010')
=> #

ruby 1.9.2dev (2010-05-13 revision 27783) [x86_64-darwin10.3.0]
=end

History

#1

Updated by matz (Yukihiro Matsumoto) over 9 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')
|=> #
|
|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

#2

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Status changed from Open to Rejected

=begin

=end

Also available in: Atom PDF