From a1f6e6ed79c2c910e96b193b03af7575fce7b1fd Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 4 Aug 2006 05:02:54 +0000 Subject: * 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 --- lib/date/format.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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] -- cgit