Flowdock

No documentation

This class has no description. You can help the Ruby on Rails community by adding new notes.

Aliases

  • inspect
  • to_s
  • -
  • +

Constants

DATE_FORMATS = { :short => "%e %b", :long => "%B %e, %Y", :db => "%Y-%m-%d", :number => "%Y%m%d", :long_ordinal => lambda { |date| date.strftime("%B #{ActiveSupport::Inflector.ordinalize(date.day)}, %Y") }, # => "April 25th, 2007" :rfc822 => "%e %b %Y"

Attributes

Show files where this class is defined (6 files)
Register or log in to add new notes.
August 5, 2014
0 thanks

simple use

Examples

<%= @user.created_at.to_date.to_formatted_s(:long_ordinal)%> => July 5th, 2014

OR

<%=@user.created_at.strftime("%b %d,%Y") %> =>  Jul 05,2014

quick ref:-

:db           # => 2008-12-25 14:35:05
:number       # => 20081225143505
:time         # => 14:35
:short        # => 25 Dec 14:35
:long         # => December 25, 2008 14:35
:long_ordinal # => December 25th, 2008 14:35
:rfc822       # => Thu, 25 Dec 2008 14:35:05 +0000