1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/date/lib/date/format.rb: fixed a bug of regex.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2011-04-24 17:48:33 +00:00
parent 2115af3a46
commit b7133cc6c7
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Mon Apr 25 02:47:46 2011 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/lib/date/format.rb: fixed a bug of regex.
Mon Apr 25 02:12:26 2011 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/lib/date/format.rb: an adjustment of regex.

View file

@ -206,7 +206,8 @@ class Date
end
e
elsif /\A\s*(?:([-+]?(?:\d{4}|\d{2})|--)(\d{2})(\d{2})|
([-+]?(?:\d{4}|\d{2}))?(\d{3)}|-(\d{3})|
([-+]?(?:\d{4}|\d{2}))?(\d{3})|
-(\d{3})|
(\d{4}|\d{2})?w(\d{2})(\d))
(?:t?
(\d{2})(\d{2})(?:(\d{2})(?:[,.](\d+))?)?