Skip to content

Instantly share code, notes, and snippets.

@unnitallman
Created May 14, 2012 06:03
Show Gist options
  • Save unnitallman/2692072 to your computer and use it in GitHub Desktop.
Save unnitallman/2692072 to your computer and use it in GitHub Desktop.
Custom time formats
#config/initializers/conversions.rb
Time::Conversions::DATE_FORMATS.update(:event => '%I:%M%p')
Time.now.to_s(:event) #=> "03:23PM"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment