diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/date/lib/date/format.rb | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -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. diff --git a/ext/date/lib/date/format.rb b/ext/date/lib/date/format.rb index eb69cf1877..d2dec22f02 100644 --- a/ext/date/lib/date/format.rb +++ b/ext/date/lib/date/format.rb @@ -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 |