summaryrefslogtreecommitdiff
path: root/lib/date
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 16:45:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 16:45:35 +0000
commit29cef5f795043a048a58874d90de0dfe01aa12ea (patch)
tree6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/date
parent8815306dc5aadd777c887bbd8de7057598ad709c (diff)
use Object#class instead of deprecated Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date')
-rw-r--r--lib/date/format.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/date/format.rb b/lib/date/format.rb
index e099854aa4..ac096f0751 100644
--- a/lib/date/format.rb
+++ b/lib/date/format.rb
@@ -483,13 +483,13 @@ class Date
when '%r'; o << strftime('%I:%M:%S %p') # P2,ID
when '%S'; o << '%02d' % sec
when '%s' # TZ,GL
- d = ajd - type.jd_to_ajd(type.civil_to_jd(1970,1,1), 0)
+ d = ajd - self.class.jd_to_ajd(type.civil_to_jd(1970,1,1), 0)
s = (d * 86400).to_i
o << '%d' % s
when '%T'; o << strftime('%H:%M:%S') # P2,ID
when '%t'; o << "\t" # P2,ID
when '%U', '%W'
- a = type.civil_to_jd(year, 1, 1, ns?) + 6
+ a = self.class.civil_to_jd(year, 1, 1, ns?) + 6
k = if c == '%U' then 0 else 1 end
w = (jd - (a - ((a - k) + 1) % 7) + 7) / 7
o << '%02d' % w