From 8ab196ce6c2d5de323bdd8ebcc11a73814c0cdca Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 26 Apr 2006 21:18:01 +0000 Subject: Merge from 3.0 branch till 971. --- framework/I18N/core/NumberFormat.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'framework/I18N/core/NumberFormat.php') diff --git a/framework/I18N/core/NumberFormat.php b/framework/I18N/core/NumberFormat.php index bde87e65..d1184f86 100644 --- a/framework/I18N/core/NumberFormat.php +++ b/framework/I18N/core/NumberFormat.php @@ -63,7 +63,7 @@ require_once(dirname(__FILE__).'/util.php'); * $ja = new NumberFormat('ja_JP'); * * //Japanese currency pattern, and using Japanese Yen symbol - * $ja->format(123.14,'c','JPY'); //�123 (Yen 123) + * $ja->format(123.14,'c','JPY'); //�?123 (Yen 123) * * For each culture, the symbol for each currency may be different. * @@ -166,12 +166,17 @@ class NumberFormat $string = substr($string, 0, $dp); $integer = ''; + + $digitSize = $this->formatInfo->getDigitSize(); + + $string = str_pad($string, $digitSize, '0',STR_PAD_LEFT); $len = strlen($string); $groupSeparator = $this->formatInfo->GroupSeparator; $groupSize = $this->formatInfo->GroupSizes; + $firstGroup = true; $multiGroup = is_int($groupSize[1]); $count = 0; -- cgit v1.2.3