Class: Time
Instance Method Summary collapse
Instance Method Details
#strftime(format_string) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/integrity/core_ext/time.rb', line 3 def strftime(format_string) format_string.gsub! "%o", case day when 1, 21, 31 then "st" when 2, 22 then "nd" when 3, 23 then "rd" else "th" end strftime_without_ordinals(format_string) end |
#strftime_without_ordinals ⇒ Object
2 |
# File 'lib/integrity/core_ext/time.rb', line 2 alias :strftime_without_ordinals :strftime |