rails/rails — pull request #5712 by avakhov (2012-04-03 06:01:52+00:00)
Title: Add to_s("strftime-format") support for Time, Date, DateTime

I suggest to add `#to_s("%Y-%m...")` support for all time types. Often I need to add date with specific format in one place. There are 3 variants:

``` ruby
Time.now.strftime("%Y-%m") # `strftime`, hm, I just can't remember this name :)
Time.now.to_s(:custom) # add config/initializers/time_format.rb - it's boring and overhead for one time usage
I18n.l(Time.now, format: "%Y-%m") # overhead, especially for single language applications

Time.now.to_s("%Y-%m") # seems pretty good
```