Adding days to date

?

-- --

Hello,

Does anyone know what the problem with the following code ???
=> "2483-06-07"

Thanks in advance
 
?

-- --

botp said:
compare

Date.today + 1
Date.today + 2
Time.now + 1.day
Time.now + 2.day
=> "Thu Apr 29 09:32:28 +0000 2010"

1.day is in seconds, so it adds 86400 days instead of 1...

Thank you for your replies !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,408
Latest member
AlenaRay88

Latest Threads

Top