Date#change (#6910)
May 30th, 2007
Active Support.
You can now change components of a Date object, like so:
date = Date.new(2007, 5, 31)
date = date.change(:year => 2008)
=> date object is now 2008-05-31
This matches the currently existing Time#change in Active Support.
Sorry, comments are closed for this article.