rails/rails — pull request #12822 by cbartlett (2013-11-09 15:22:35+00:00)
Title: Add support for localized date references

Ruby's `Date` class automatically gives us `#yesterday`, `#today`, and `#tomorrow`. And ActiveSupport has a handy `Time.zone.today` for getting a localized version. But there was no localized version of `#yesterday` or `#tomorrow`.

This patch adds those methods.

Any thoughts on this? I think if we offer #today to mimic the behavior of `Date`, perhaps we should also offer `#tomorrow` and `#yesterday`? I ran into the problem when localizing an app and converting a bunch of `Date.today` and `Date.tomorrow` usages.