Advertisement
niammuddin

fungsi convert time youtube API

Jul 27th, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. <?php
  2. function covtime($youtube_time){
  3. $start = new DateTime('@0'); // Unix epoch
  4. $start->add(new DateInterval($youtube_time));
  5. if (strlen($youtube_time)>8){
  6. return $start->format('g:i:s');} else {
  7. return $start->format('i:s');}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement