Skip to content

Instantly share code, notes, and snippets.

@apeiros
Forked from jgrau/gist:959953
Created May 6, 2011 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeiros/959955 to your computer and use it in GitHub Desktop.
Save apeiros/959955 to your computer and use it in GitHub Desktop.
h,m,s = *"23:34:02".match(/\A(\d+):(\d\d):(\d\d)\z/).captures
Time.now+h.to_i*3600+m.to_i*60+s.to_i
@apeiros
Copy link
Author

apeiros commented May 6, 2011

h,m,s = _"23:34:02".match(/\A(\d+):(\d\d):(\d\d)\z/).captures
Time.now+h.to_i_3600+m.to_i*60+s.to_i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment