Time.now.to_ordinalized_s :long
Gives you a relative date in an attractive format
format | strftime string used to format a time/date object |
locale<String, Symbol> | An optional value which can be used by localization plugins |
String | Ordinalized time/date object |
5.days.ago.strftime_ordinalized('%b %d, %Y') # =>
# File lib/merb-helpers/date_time_formatting.rb, line 153 153: def strftime_ordinalized(fmt, format=nil) 154: strftime(fmt.gsub(/(^|[^-])%d/, '\1_%d_')).gsub(/_(\d+)_/) { $1.to_i.ordinalize } 155: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.