How to add 10 days to current time in Rails

前端 未结 6 986
一向
一向 2020-12-07 12:38

I tried doing something like

Time.now + 5.days

but that doesn\'t work, even though I vaguely remember seeing, and being very impressed, wi

6条回答
  •  一整个雨季
    2020-12-07 13:29

    Try this on Ruby. It will return a new date/time the specified number of days in the future

    DateTime.now.days_since(10)
    

提交回复
热议问题