summaryrefslogtreecommitdiffstats
path: root/lib/date/format.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-10 22:33:48 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-10 22:33:48 +0000
commit56dc95c3d5113a41cd6ce0e6935840fbe6c082f9 (patch)
tree6d214b86270251e59871da1dafbcae65922d031a /lib/date/format.rb
parentad84b7055020f539074b7d37c0664d7ce48996b8 (diff)
downloadruby-56dc95c3d5113a41cd6ce0e6935840fbe6c082f9.tar.gz
ruby-56dc95c3d5113a41cd6ce0e6935840fbe6c082f9.tar.xz
ruby-56dc95c3d5113a41cd6ce0e6935840fbe6c082f9.zip
* lib/date/format.rb: reverted some wrongly erased "o" options
(pointed out by nobu). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date/format.rb')
-rw-r--r--lib/date/format.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/date/format.rb b/lib/date/format.rb
index 0480f1b6c..32f4954cf 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