diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
| commit | 8e011248465bae7b06203bc2c260432454bcac21 (patch) | |
| tree | 6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/date/format.rb | |
| parent | 50c355b12eac3ffa982fc60e96a8a272b6b4dff9 (diff) | |
| download | ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.gz ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.xz ruby-8e011248465bae7b06203bc2c260432454bcac21.zip | |
use Object#class instead of deprecated Object#type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date/format.rb')
| -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 e099854aa..ac096f075 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 |
