Date arithmatic

Hi!
I want to find out the no. of days left for a trader to find out
no. of
days remaining to submit the quotation. I am doing it as follows:
No of days remaining: <%= Date.today-advertised_on%> where
advertised_on
is the date when the ad for quotation was published with
datetime as the type.
I m getting an error as Cant’s convert Float to Date. Why is it so??
Is
thre ne other way??
Regards,
Swanand

Take a look at
http://www.rubyonrails.org/api/classes/ActiveSupport/CoreExtensions/Time/Calculations.html

Thnx man!!! Tht was helpful.
Thnx and regards,
Swanand

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs