diff options
author | xue <> | 2006-04-26 21:18:01 +0000 |
---|---|---|
committer | xue <> | 2006-04-26 21:18:01 +0000 |
commit | 8ab196ce6c2d5de323bdd8ebcc11a73814c0cdca (patch) | |
tree | e77b1306648d03920439290bb8f3e27821410804 /framework/I18N/core/NumberFormat.php | |
parent | 5ba6cd4be568f686d890835a77586077cde1a943 (diff) |
Merge from 3.0 branch till 971.
Diffstat (limited to 'framework/I18N/core/NumberFormat.php')
-rw-r--r-- | framework/I18N/core/NumberFormat.php | 7 |
1 files changed, 6 insertions, 1 deletions
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)
* </code>
* 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;
|