Created
June 13, 2010 16:12
-
-
Save dannymcc/436777 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create your own date styles | |
# environment.rb | |
ActiveSupport::CoreExtenstions::Time::Conversions::DATE_FORMATS.merge!( | |
:simple => "%d %b %Y", | |
:last_login => "Last login: %m/%d/%y at %I:%M %p" | |
) | |
# used the same as above | |
>> now.to_s(:simple) | |
# => "05 Mar 2007" | |
>> now.to_s(:last_login) | |
# => "Last login: 03/05/07 at 06:30 PM" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment