summaryrefslogtreecommitdiff
path: root/framework/I18N/core/NumberFormatInfo.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/NumberFormatInfo.php
parent7fa4dd96f1ac0c57e6c67faf9f9dda46f1dd1b89 (diff)
Complete #70, update TDateFormat, NumberFormat add zerofill. Update TDatePicker quickstart doc, I18N quickstart doc.
Diffstat (limited to 'framework/I18N/core/NumberFormatInfo.php')
-rw-r--r--framework/I18N/core/NumberFormatInfo.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/framework/I18N/core/NumberFormatInfo.php b/framework/I18N/core/NumberFormatInfo.php
index 15b9ee5d..3531cc7f 100644
--- a/framework/I18N/core/NumberFormatInfo.php
+++ b/framework/I18N/core/NumberFormatInfo.php
@@ -324,6 +324,13 @@ class NumberFormatInfo
}
}
}
+
+ if(is_int($decimalPos))
+ $digitPattern = substr($pattern,0,$decimalPos);
+ else
+ $digitPattern = $pattern;
+
+ $digitPattern = preg_replace('/[^0]/','',$digitPattern);
$info['groupPos1'] = $groupPos1;
$info['groupSize1'] = $groupSize1;
@@ -331,6 +338,7 @@ class NumberFormatInfo
$info['groupSize2'] = $groupSize2;
$info['decimalPos'] = $decimalPos;
$info['decimalPoints'] = $decimalPoints;
+ $info['digitSize'] = strlen($digitPattern);
return $info;
}
@@ -365,6 +373,16 @@ class NumberFormatInfo
return $this->pattern['decimalPoints'] = $value;
}
+ function getDigitSize()
+ {
+ return $this->pattern['digitSize'];
+ }
+
+ function setDigitSize($value)
+ {
+ $this->pattern['digitSize'] = $value;
+ }
+
/**
* Gets the string to use as the decimal separator.
* @return string decimal separator.