Home » Numbers » Numbers_Words » Bug #6654
russian locale - wrong toCurrency
Details
| Submitted | 2006-02-01 12:37 UTC |
|---|---|
| From | trostin at gmail dot com |
| Assigned | makler |
| Status | Closed |
| Package | Numbers_Words |
| PHP Version | 4.3.11 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2006-02-01 12:37 UTC] trostin at gmail dot com
Description:
------------
$handle->toCurrency(405, "ru")
return "ЧетыреÑта пÑтнадцать рублей"
must "ЧетыреÑта пÑть рублей"
[2006-02-15 14:35 UTC] mot at tdvniikp dot ru
$num = new Numbers_Words();
$words = $num->toCurrency(1201.54);
return "Одна тыÑÑча двеÑти одиннадцать рублей пÑтьдеÑÑÑ‚ четыре копейки."
must return "Одна тыÑÑча двеÑти один рубль пÑтьдеÑÑÑ‚ четыре копейки."
[2006-03-14 19:01 UTC] mot at tdvniikp dot ru
Maintainer - this is very serious bug, we need your help please!
[2006-03-15 09:00 UTC] trostin at gmail dot com
to correct in file
Numbers\Words\lang.ru.php
$ones=(int)$num{2};
...
...
- elseif ($tens < 2) $ret .= $this->_teens[$ones+10];
+ elseif ( ($tens > 0) && ($tens < 2) ) $ret .= $this->_teens[$ones+10];
else {
- $ret .= $this->_tens[(int)$tens];
+ $ret .= @$this->_tens[(int)$tens];
if ($ones > 0) {
...
...
[2006-06-12 13:52 UTC] makler at php dot net
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.