(date2.year * 12 + date2.month) - (date1.year * 12 + date1.month)
more info at http://www.ruby-forum.com/topic/72120
More Related Contents:
- In Ruby on Rails, how do I format a date with the “th” suffix, as in, “Sun Oct 5th”?
- How do I validate a date in rails?
- Rails formatting date
- Error when running rails app – ExecJS::RuntimeError
- Can we call a Controller’s method from a view (as we call from helper ideally)?
- Convert HTML to word file ?
- Rails 3.1 limit user created objects
- How to check if a string is a valid date
- How to prevent browser page caching in Rails
- ‘sudo gem install’ or ‘gem install’ and gem locations
- ActiveRecord: size vs count
- Altering the primary key in Rails to be a string
- How to extract URL parameters from a URL with Ruby or Rails?
- How do I ‘validate’ on destroy in rails
- How to get a query string from a URL in Rails
- Is there a way to access method arguments in Ruby?
- Convert Time from one time zone to another in Rails
- What is the use of Gemfile in rails?
- Heroku not sending email with Gmail SMTP
- How to set default values in Rails?
- undefined method `visit’ when using RSpec and Capybara in rails
- nokogiri gem installation error
- How to edit or write on existing PDF with Ruby?
- Ruby: problem installing EventMachine under Windows 7
- What is the difference between pluck and collect in Rails?
- Looking for suggestions for building a secure REST API within Ruby on Rails
- Rails – Sort by join table data
- strong parameters permit all attributes for nested attributes
- Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432?
- Unable to install MySQL2 gem on Windows 7