Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.1
-
Fix Version/s: 1.8.0
-
Component/s: Zend_Locale
-
Labels:None
Description
I encountered a bug when trying to use
$number = Zend_Locale_Format::toNumber('26.7857142857', array('precision' => 2, 'locale' => 'sv_SE'); Instead of 26,79 it returned 26,78.
I then tried with the examples given in the reference guide and they also returned wrong results.
$locale = new Zend_Locale('de_AT');
$number = Zend_Locale_Format::getNumber('13.524,678', array('precision' => 1, 'locale' => $locale));
print $number; // will return 13524.7
In fact this code will return 13524.6
$locale = new Zend_Locale('de_AT');
$number = Zend_Locale_Format::getNumber('13.524,678', array('number_format' => '#.00', 'locale' => $locale));
print $number; // will return 13524.67
This is currently returning a value of 13524.678
Issue Links
| This issue is dependecy of: | ||||
| ZF-9698 | CLONE - Precision and number_format seems to be broken |
|
|
|
| This issue duplicates: | ||||
| ZF-3473 | Zend_Locale_Format::toNumber(9.72, array('locale' => 'en')) returns 9.7 instead of 9.72 |
|
|
|
| This issue is duplicated by: | ||||
| ZF-9698 | CLONE - Precision and number_format seems to be broken |
|
|
|
Duplicate of
ZF-3473ZF-3473