From d8e80aeb824feeb439a51e6a40d862c6e630d6a0 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Sat, 30 Jun 2012 02:24:49 -0400 Subject: [PATCH] make format_decimal always omit the ".0" suffix --- format.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 1.7.10.4