Jim Lindley Notes

New default time format, long_ordinal.

Date.new(2005, 2, 21).to_s(:long_ordinal) 
# "February 21st, 2005"

Time formats can now be given as block, for example here is the definition of :long_ordinal:

:long_ordinal => lambda do |time| 
  time.strftime("%B #{time.day.ordinalize}, %Y %H:%M") 
end

Changeset #6844

Sorry, comments are closed for this article.