In ruby,
@today_date = Time.now.utc.strftime("%Y-%m-%d")
If today date is :: 2011-07-20
But Now I want date before 2 days :: 2011-07-17 by using Ruby Code. Please suggest something.
Thanks
# 1:
(Time.now - 2.days).utc.strftime....
# 2:
2.days.ago.utc.strftime...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With