Skip to content

Commit

Permalink
Num::format() should not include the currency symbol, money_format() …
Browse files Browse the repository at this point in the history
…should be used for this purpose
  • Loading branch information
Woody Gilk committed Nov 22, 2009
1 parent f922e84 commit 990e31d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions classes/kohana/num.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public static function ordinal($number)
}

/**
* Format a number.
* Locale-aware number formatting.
*
* @param float number to format
* @param integer decimal places
* @param boolean monetary format?
* @param boolean monetary formatting?
* @return string
*/
public static function format($number, $places, $monetary = FALSE)
Expand All @@ -51,16 +51,14 @@ public static function format($number, $places, $monetary = FALSE)
{
$decimal = $info['mon_decimal_point'];
$thousands = $info['mon_thousands_sep'];
$currency = $info['currency_symbol'];
}
else
{
$decimal = $info['decimal_point'];
$thousands = $info['thousands_sep'];
$currency = NULL;
}

return $currency.number_format($number, $places, $decimal, $thousands);
return number_format($number, $places, $decimal, $thousands);
}

final private function __construct()
Expand Down

0 comments on commit 990e31d

Please sign in to comment.