diff --git a/base.php b/base.php index d7990c75..bff14d48 100644 --- a/base.php +++ b/base.php @@ -964,8 +964,12 @@ function_exists('money_format')) $args[$pos]*100,0,$decimal_point, $thousands_sep).'%'; } + $frac=$args[$pos]-(int)$args[$pos]; return number_format( - $args[$pos],isset($prop)?$prop:2, + $args[$pos], + isset($prop)? + $prop: + $frac?strlen($frac)-2:0, $decimal_point,$thousands_sep); case 'date': if (empty($mod) || $mod=='short')