diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-04 05:02:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-04 05:02:54 +0000 |
commit | a1f6e6ed79c2c910e96b193b03af7575fce7b1fd (patch) | |
tree | fe66cd23bff99bd1a305d40159561832def09166 /lib | |
parent | 99afac877a05e439f0b0b1c789888e8907b9bb28 (diff) | |
download | ruby-a1f6e6ed79c2c910e96b193b03af7575fce7b1fd.tar.gz ruby-a1f6e6ed79c2c910e96b193b03af7575fce7b1fd.tar.xz ruby-a1f6e6ed79c2c910e96b193b03af7575fce7b1fd.zip |
* lib/date/format.rb (__strptime, strftime): allow multi-line patterns
in Date#strftime the same as Time#strftime accepts.
fixed: [ruby-core:08466]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/date/format.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/date/format.rb b/lib/date/format.rb index babcffbfc..52eecaf2a 100644 --- a/lib/date/format.rb +++ b/lib/date/format.rb @@ -51,7 +51,7 @@ class Date } def self.__strptime(str, fmt, elem) - fmt.scan(/%[EO]?.|./o) do |c| + fmt.scan(/%[EO]?.|./mo) do |c| cc = c.sub(/\A%[EO]?(.)\Z/o, '%\\1') case cc when /\A\s/o @@ -490,7 +490,7 @@ class Date def strftime(fmt='%F') o = '' - fmt.scan(/%[EO]?.|./o) do |c| + fmt.scan(/%[EO]?.|./mo) do |c| cc = c.sub(/^%[EO]?(.)$/o, '%\\1') case cc when '%A'; o << DAYNAMES[wday] |