Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

seconds to days hours minutes seconds php

function seconds2human($ss) {
$s = $ss%60;
$m = floor(($ss%3600)/60);
$h = floor(($ss%86400)/3600);
$d = floor(($ss%2592000)/86400);
$M = floor($ss/2592000);

return "$M months, $d days, $h hours, $m minutes, $s seconds";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #seconds #days #hours #minutes #seconds #php
ADD COMMENT
Topic
Name
1+8 =