RailsのActiveSupport::TimeWithZoneでの日時の操作
日時を英語に近いニュアンスで記述できる
code: (rb)
1.day.ago #=> 1日前の時刻
2.hours.from_now #=> 2時間後の時刻
3.weeks.ago.to_date #=> 3週間前の日付
https://railsguides.jp/active_support_core_extensions.html#numeric%E3%81%AE%E6%8B%A1%E5%BC%B5-time
https://zenn.dev/yuki_fujisawa/articles/687b48afed5f22
#Rails