Take the 2-minute tour ×

Let's say we have a specific date, like:

specific_date = Date.today
=> Tue, 17 Dec 2013

Is there any method in Ruby or Rails that can return the same date x months in the future? E.g:

=> Mon, 17 Feb 2014
share|improve this question

1 Answer 1

up vote 1 down vote accepted

I've done similar things using simple formulas. For example:

self.expire_date = Date.today + 60

Outputs a date 60 days after today's date. I believe you should be able to do the following for your use:

Date.today + 2.months

Hope that helps!

share|improve this answer
Also check out the other date helpers that ActiveSupport gives you in Rails. –  Beartech Dec 31 '13 at 1:43

Your Answer


