Skip to content

Instantly share code, notes, and snippets.

@neopunisher
Created October 21, 2011 14:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neopunisher/1303942 to your computer and use it in GitHub Desktop.
Save neopunisher/1303942 to your computer and use it in GitHub Desktop.
Format youtube seconds from api
function ytsec(a){var b=Math.floor(a/3600),c=Math.floor((a-b*3600)/60),a=a-b*3600-c*60;return(b>0?b+":":"")+(c<10?"0"+c:c)+":"+(a<10?"0"+a:a)};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment