Add years to readable durations

This commit is contained in:
Xkeeper 2017-07-19 00:22:20 -07:00
parent 0449b82b42
commit 877647b409

View File

@ -328,7 +328,8 @@ function timeunits($sec){
if($sec<7200) return '1 hour';
if($sec<86400) return floor($sec/3600).' hours';
if($sec<172800) return '1 day';
return floor($sec/86400).' days';
if($sec<31556926) return floor($sec/86400).' days';
return sprintf("%.1f years", floor($sec/31556926));
}
function timeunits2($sec){