Skip to content

Instantly share code, notes, and snippets.

@delba
Created June 12, 2013 19:09
Show Gist options
  • Select an option

  • Save delba/5768194 to your computer and use it in GitHub Desktop.

Select an option

Save delba/5768194 to your computer and use it in GitHub Desktop.
strftime
Time.now.strftime("%I:%M%p") #=> "09:06PM"
Time.now.strftime("%H:%M") #=> "21:06"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment