summaryrefslogtreecommitdiff
path: root/lib/date/format.rb
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-31 23:45:05 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-31 23:45:05 +0000
commit08ba6b3f36c513c249d743a9fd6848d5b032ab14 (patch)
tree4711176a45edef6c6060888c8a5fc1c845f0e150 /lib/date/format.rb
parent655e3143b35387d1e365789bf7da0454fd1947ec (diff)
merge revision(s) 15084:
* lib/date.rb (Date::Infinity#<=>): didn't work. A patch from Dirkjan Bussink <d.bussink AT gmail.com> [ruby-core:15098]. This is a bug obviously. However it didn't affect the library's functions. * lib/date.rb, lib/date/format.rb: some trivial changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@21222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date/format.rb')
-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 8bd14c7..6b082af 100644
--- a/lib/date/format.rb
+++ b/lib/date/format.rb
@@ -239,12 +239,12 @@ class Date
when 'j'; emit_n(yday, 3, f)
when 'k'; emit_a(hour, 2, f)
when 'L'
- emit_n((sec_fraction / (1.to_r/86400/(10**3))).round, 3, f)
+ emit_n((sec_fraction / (1.to_r/86400/(10**3))).floor, 3, f)
when 'l'; emit_a((hour % 12).nonzero? || 12, 2, f)
when 'M'; emit_n(min, 2, f)
when 'm'; emit_n(mon, 2, f)
when 'N'
- emit_n((sec_fraction / (1.to_r/86400/(10**9))).round, 9, f)
+ emit_n((sec_fraction / (1.to_r/86400/(10**9))).floor, 9, f)
when 'n'; "\n"
when 'P'; emit_ad(strftime('%p').downcase, 0, f)
when 'p'; emit_au(if hour < 12 then 'AM' else 'PM' end, 0, f)