I have a problem with date subtraction in Ruby
"2011-03-29".to_date - "2011-03-20".to_date #=> (9/1)
("2011-03-29".to_date - "2011-03-20".to_date).to_i #=> 9
Seems it's returning the difference between dates in number of days.
Now my problem is to return number of years, months, days of the date difference
ie ("2011-03-29".to_date - "2011-03-20".to_date)
should return
0 years, 0 month and 9 days
Thanks.