From 7b8cc60ae3bc99d7b8777d118723988f1534a401 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 27 Jul 2010 20:06:31 +0300 Subject: [PATCH] added description to Time#round --- lib/time_ext/time.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/time_ext/time.rb b/lib/time_ext/time.rb index 318732a..228d024 100644 --- a/lib/time_ext/time.rb +++ b/lib/time_ext/time.rb @@ -24,6 +24,7 @@ class Time alias :beginning_of_next :ceil alias :at_beginning_of_next :ceil + # Returns a new Time representing the start of the current or next unit specified (second by default) depending which is closest def round(unit = :sec) next_unit = self.ceil(unit) this_unit = self.floor(unit)