From: wmorgan Date: Sat, 6 Jan 2007 04:10:42 +0000 (+0000) Subject: fixed "1 hours" => "one hour" X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=92641da45c4f6cadb2f69eb99563c911ba78ceeb;p=sup fixed "1 hours" => "one hour" git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@203 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/util.rb b/lib/sup/util.rb index 0216c51..f3e0a2c 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -228,7 +228,7 @@ class Time ["month", 12], ["year", nil], ].argfind do |unit, size| - if diff <= 1 + if diff.round <= 1 "one #{unit}" elsif size.nil? || diff.round < size "#{diff.round} #{unit}s"