Reputation: 1590
I have a Subscription model. In my subscriptions table I have a DateTime column called expires_at
.
For example:
expires_at: "2013-07-03 08:00:26"
I need to add 30 days more. Which method do I need to use for this?
Upvotes: 4
Views: 7141
Reputation: 44360
Try this:
=> object.expires_at + 1.month
=> Sat, 03 Aug 2013 08:00:26 +0000
Upvotes: 12