git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2006-08-07 13:19:14 +00:00
Родитель 1293d0dbc6
Коммит 0c724c2734
2 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -10,12 +10,6 @@ Mon Aug 7 15:55:08 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/syck/syck.c (syck_move_tokens): should avoid negative
memmove. [ruby-list:42625]
Mon Aug 7 14:51:18 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/date/format.rb: specify maximum number of digits to parse
"200608007". %Y(4), %y(2), %m(2), %d(2). [ruby-core:8484]
[experimental]
Mon Aug 7 14:37:48 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* configure.in, common.mk: AIX link issue. a patch from Yutaka

Просмотреть файл

@ -75,7 +75,7 @@ class Date
when '%D'
return unless __strptime(str, '%m/%d/%y', elem)
when '%d', '%e'
return unless str.sub!(/\A ?(\d{1,2})/o, '')
return unless str.sub!(/\A ?(\d+)/o, '')
val = $1.to_i
return unless (1..31) === val
elem[:mday] = val
@ -112,7 +112,7 @@ class Date
return unless (0..59) === val
elem[:min] = val
when '%m'
return unless str.sub!(/\A(\d{1,2})/o, '')
return unless str.sub!(/\A(\d+)/o, '')
val = $1.to_i
return unless (1..12) === val
elem[:mon] = val
@ -171,11 +171,11 @@ class Date
when '%x'
return unless __strptime(str, '%m/%d/%y', elem)
when '%Y'
return unless str.sub!(/\A([-+]?\d{1,4})/o, '')
return unless str.sub!(/\A([-+]?\d+)/o, '')
val = $1.to_i
elem[:year] = val
when '%y'
return unless str.sub!(/\A(\d{2})/o, '')
return unless str.sub!(/\A(\d+)/o, '')
val = $1.to_i
return unless (0..99) === val
elem[:year] = val