mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 08:40:21 -07:00
Add years to readable durations
This commit is contained in:
parent
0449b82b42
commit
877647b409
@ -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){
|
||||
|
Loading…
x
Reference in New Issue
Block a user