I needed to do some date arithmetic in Ruby today and I wasn’t easily finding a way to do it. I kept looking for an easily discoverable way to add values to parts of the date. I finally found what I was looking for onĀ stackoverflow. The Ruby Date class overrides the +/-/<</>> operators to do date arithmetic. This doesn’t seem like the most intuitive way to do it to me. I would much prefer there were methods on the Date class such as addday, addmonth, add_year, or an advance method that took a hash of date part options likeĀ Date.now.advance({:day => 3}).