diff options
Diffstat (limited to 'framework/I18N/core/NumberFormatInfo.php')
-rw-r--r-- | framework/I18N/core/NumberFormatInfo.php | 18 |
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.
|