Please share if there any such easy methods in rails. I have dates like
date1 = Date.today date2 = Date.today - 3.months (Example can be anything)
Now how to get month difference as 3 (date1 - date2)
Thanks for any help Tom
Please share if there any such easy methods in rails. I have dates like
date1 = Date.today date2 = Date.today - 3.months (Example can be anything)
Now how to get month difference as 3 (date1 - date2)
Thanks for any help Tom
Googling for "ruby months between two dates" gleans this as the first result: http://www.francisfish.com/getting_the_number_of_months_between_two_dates_in_rubyrails.htm
...and loads of other likely candidates.