From: Kirk Haines Date: 2005-11-22T08:08:05+09:00 Subject: Re: The ruby way : DateTime calculations ? On Monday 21 November 2005 3:48 pm, Peter Fitzgibbons wrote: > Is there an existent lib or such that gives me some date/time calculations > ? > > Time.now - 2.minutes for instance ? Time.now - 2 * 60 or (some people would argue that this is the best approach) Minute = 60 Hour = Minute * 60 Day = Hour * 24 Time.now - 2 * Minute or The ActiveSupport library for Rails has those sorts of methods defined. or I think Facets might have these, too. or Roll your own. They are easy to write. Kirk Haines