diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-10 22:33:48 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-10 22:33:48 +0000 |
commit | 6a7dc2698560cb1c3a46a3f45d821aae5431bbca (patch) | |
tree | 6d214b86270251e59871da1dafbcae65922d031a /lib/date | |
parent | 1a7564a0ed8aa82eb3a7002906e34388b677dc58 (diff) | |
download | ruby-6a7dc2698560cb1c3a46a3f45d821aae5431bbca.tar.gz |
* lib/date/format.rb: reverted some wrongly erased "o" options
(pointed out by nobu).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date')
-rw-r--r-- | lib/date/format.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/date/format.rb b/lib/date/format.rb index 0480f1b6cc..32f4954cfa 100644 --- a/lib/date/format.rb +++ b/lib/date/format.rb @@ -656,7 +656,7 @@ class Date private_class_method :s3e def self._parse_day(str, e) # :nodoc: - if str.sub!(/\b(#{Format::ABBR_DAYS.keys.join('|')})[^-\d\s]*/in, ' ') + if str.sub!(/\b(#{Format::ABBR_DAYS.keys.join('|')})[^-\d\s]*/ino, ' ') e.wday = Format::ABBR_DAYS[$1.downcase] true =begin @@ -752,7 +752,7 @@ class Date \s* ('?-?\d+(?:(?:st|nd|rd|th)\b)?) )? - /inx, + /inox, ' ') # ' s3e(e, $4, Format::ABBR_MONTHS[$2.downcase], $1, $3 && $3[0,1].downcase == 'b') @@ -771,7 +771,7 @@ class Date \s* ('?-?\d+) )? - /inx, + /inox, ' ') # ' s3e(e, $4, Format::ABBR_MONTHS[$1.downcase], $2, $3 && $3[0,1].downcase == 'b') @@ -834,11 +834,11 @@ class Date def self._parse_vms(str, e) # :nodoc: if str.sub!(/('?-?\d+)-(#{Format::ABBR_MONTHS.keys.join('|')})[^-]* - -('?-?\d+)/inx, ' ') + -('?-?\d+)/inox, ' ') s3e(e, $3, Format::ABBR_MONTHS[$2.downcase], $1) true elsif str.sub!(/\b(#{Format::ABBR_MONTHS.keys.join('|')})[^-]* - -('?-?\d+)(?:-('?-?\d+))?/inx, ' ') + -('?-?\d+)(?:-('?-?\d+))?/inox, ' ') s3e(e, $3, Format::ABBR_MONTHS[$1.downcase], $2) true end @@ -903,7 +903,7 @@ class Date end def self._parse_mon(str, e) # :nodoc: - if str.sub!(/\b(#{Format::ABBR_MONTHS.keys.join('|')})\S*/in, ' ') + if str.sub!(/\b(#{Format::ABBR_MONTHS.keys.join('|')})\S*/ino, ' ') e.mon = Format::ABBR_MONTHS[$1.downcase] true end @@ -1273,7 +1273,7 @@ class Date (?:#{Format::ABBR_MONTHS.keys.join('|')})\s+ -?(\d{2,})\s+ # allow minus, anyway \d{2}:\d{2}(:\d{2})?\s* - (?:[-+]\d{4}|ut|gmt|e[sd]t|c[sd]t|m[sd]t|p[sd]t|[a-ik-z])\s*\z/inx =~ str + (?:[-+]\d{4}|ut|gmt|e[sd]t|c[sd]t|m[sd]t|p[sd]t|[a-ik-z])\s*\z/inox =~ str e = _parse(str, :comp=>false) if $1.size < 4 if e[:year] < 50 @@ -1294,20 +1294,20 @@ class Date (#{Format::ABBR_MONTHS.keys.join('|')})\s+ -?\d{4}\s+ # allow minus, anyway \d{2}:\d{2}:\d{2}\s+ - gmt\s*\z/inx =~ str + gmt\s*\z/inox =~ str _rfc2822(str) elsif /\A\s*(#{Format::DAYS.keys.join('|')})\s*,\s+ \d{2}\s*-\s* (#{Format::ABBR_MONTHS.keys.join('|')})\s*-\s* \d{2}\s+ \d{2}:\d{2}:\d{2}\s+ - gmt\s*\z/inx =~ str + gmt\s*\z/inox =~ str _parse(str) elsif /\A\s*(#{Format::ABBR_DAYS.keys.join('|')})\s+ (#{Format::ABBR_MONTHS.keys.join('|')})\s+ \d{1,2}\s+ \d{2}:\d{2}:\d{2}\s+ - \d{4}\s*\z/inx =~ str + \d{4}\s*\z/inox =~ str _parse(str) end end |