lib: Fix sprintf format strings used in Format::seconds()
fixes #9291 Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
This commit is contained in:
parent
20a9621036
commit
b0f7773260
|
@ -59,13 +59,13 @@ class Format
|
|||
if ($value < 60) {
|
||||
return self::formatForUnits($value, self::$secondPrefix, self::$secondBase);
|
||||
} elseif ($value < 3600) {
|
||||
return sprintf('0.2f m', $value / 60);
|
||||
return sprintf('%0.2f m', $value / 60);
|
||||
} elseif ($value < 86400) {
|
||||
return sprintf('0.2f h', $value / 3600);
|
||||
return sprintf('%0.2f h', $value / 3600);
|
||||
}
|
||||
|
||||
// TODO: Do we need weeks, months and years?
|
||||
return sprintf('0.2f d', $value / 86400);
|
||||
return sprintf('%0.2f d', $value / 86400);
|
||||
}
|
||||
|
||||
protected static function formatForUnits($value, & $units, $base)
|
||||
|
|
Loading…
Reference in New Issue