date in future for Rails

Posted by Adnan on Stack Overflow See other posts from Stack Overflow or by Adnan
Published on 2010-05-04T14:15:22Z Indexed on 2010/05/04 14:18 UTC
Read the original article Hit count: 130

Filed under:
|

Hello,

I am trying to make a validation that will validate that the entered date is in future and that the selected date is in the next 7 days.

In order to validate if the date is in future I use;

valid_until.future? 

and this one works fine, but to make a validation to check if the date selected is withing 7 days from now?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about datetime