Skip to content

Instantly share code, notes, and snippets.

Created June 1, 2015 16:20
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 anonymous/6d205d53d82fbb5732c6 to your computer and use it in GitHub Desktop.
Save anonymous/6d205d53d82fbb5732c6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
h, m = 12, 55
$_.gsub!(/(\d\d):(\d\d)/) do
'%02d:%02d' % (($1.to_i + h) * 60 + $2.to_i + m).divmod(60)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment