Skip to content

Instantly share code, notes, and snippets.

@jeystaats
Created February 25, 2017 11:28
Show Gist options
  • Save jeystaats/d9fd00fc4b55159d557ce422daa7e1c3 to your computer and use it in GitHub Desktop.
Save jeystaats/d9fd00fc4b55159d557ce422daa7e1c3 to your computer and use it in GitHub Desktop.
public toSeconds(time) {
var parts = time.split(':');
return (+parts[0]) * 60 * 60 + (+parts[1]) * 60 + (+parts[2]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment