From: Farrel Lifson Date: 2007-02-06T19:40:12+09:00 Subject: Re: Calculating a future date On 06/02/07, Toine wrote: > Hello, > > I'm new to Ruby so please bare with me... > > I need to calculate a date that is exactly 31 days from the current > date in YYYY-MM-DD format. I know that Date.today returns the > current date, but how can I add 31 days to this value? I'm sure this > task is simple, but I haven't been able to figure it out. > > Thanks > > > Time now + number of seconds in 31 days Time.now + 31*24*60*60 which is equivalent to Time.now + 2678400 Farrel