Skip to content

Instantly share code, notes, and snippets.

@joshbeckman
Created September 19, 2013 15:18
Show Gist options
  • Save joshbeckman/6625074 to your computer and use it in GitHub Desktop.
Save joshbeckman/6625074 to your computer and use it in GitHub Desktop.
Convert seconds integer to mm:ss format
t = Time
min = (t/60).to_s
sec = (t-(60*(t/60))).to_s
sec.length == 1 ? (sec = '0'+sec) : (sec = sec)
min+':'+sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment