X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=format.php;h=5d7c2bb0af35a875a9de4a931fc623ef886b638d;hb=4df0be6e6debc3fbf1dfc6a4011cdf035a4cd47f;hp=13d79ce53942b8a80d2b9d347bd42c5105913f5d;hpb=e648f21f696e973b58d135cf38f786f1ebae1327;p=wfpl.git diff --git a/format.php b/format.php index 13d79ce..5d7c2bb 100644 --- a/format.php +++ b/format.php @@ -72,8 +72,8 @@ function _format_positive_decimal($str) { function format_positive_decimal($str) { $str = _format_positive_decimal($str); - if($str === '0.0') { - $str = '0'; + if(substr($str, -2) === '.0') { + $str = substr($str, 0, -2); } return $str; }