* ext/date/lib/date/format.rb: an adjustment of regex.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
60c7967e12
commit
2115af3a46
@ -1,3 +1,7 @@
|
||||
Mon Apr 25 02:12:26 2011 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* ext/date/lib/date/format.rb: an adjustment of regex.
|
||||
|
||||
Mon Apr 25 01:58:50 2011 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* ext/date/lib/date/format.rb: omitted to call _parse.
|
||||
|
@ -146,9 +146,9 @@ class Date
|
||||
|
||||
def self._iso8601(str) # :nodoc:
|
||||
if /\A\s*(?:([-+]?\d{2,}|-)-(\d{2})-(\d{2})|
|
||||
([-+]?\d{2,})?-(\d{3})|
|
||||
(\d{2}|\d{4})?-w(\d{2})-(\d)|
|
||||
-w-(\d))
|
||||
([-+]?\d{2,})?-(\d{3})|
|
||||
(\d{4}|\d{2})?-w(\d{2})-(\d)|
|
||||
-w-(\d))
|
||||
(?:t
|
||||
(\d{2}):(\d{2})(?::(\d{2})(?:[,.](\d+))?)?
|
||||
(z|[-+]\d{2}(?::?\d{2})?)?)?\s*\z/ix =~ str
|
||||
|
Loading…
x
Reference in New Issue
Block a user