Made it echo seconds if there are seconds left, or if ozero is true, or if no previous output was echoed

This commit is contained in:
pezcurrel 2024-02-26 17:52:46 +01:00
parent a611e251fc
commit 77c37c3f68

View file

@ -70,7 +70,8 @@ $ozero is whether to include a zero value for a unit
if ($buniti>=1) {
if ($out!='') $osep=$sep;
$x=round($ts,$sd);
($x==1) ? $out.=$osep.$x.' '.$fa[$i] : $out.=$osep.$x.' '.$fa[$i+1];
if ($x>0 || $ozero || $out=='')
($x==1) ? $out.=$osep.$x.' '.$fa[$i] : $out.=$osep.$x.' '.$fa[$i+1];
}
return $out;
}