summaryrefslogtreecommitdiff
path: root/framework/I18N/core/NumberFormat.php
diff options
context:
space:
mode:
authorwei <>2006-04-25 07:01:04 +0000
committerwei <>2006-04-25 07:01:04 +0000
commit8b0c8f0d0557d8ab88409cd9691cd1ee279321d5 (patch)
tree2c570f0d3839089edbb7e53244adcd2db98cb992 /framework/I18N/core/NumberFormat.php
parent7fa4dd96f1ac0c57e6c67faf9f9dda46f1dd1b89 (diff)
Complete #70, update TDateFormat, NumberFormat add zerofill. Update TDatePicker quickstart doc, I18N quickstart doc.
Diffstat (limited to 'framework/I18N/core/NumberFormat.php')
-rw-r--r--framework/I18N/core/NumberFormat.php7
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;