|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-04-24 15:29 UTC] ab@php.net
-Status: Open
+Status: Not a bug
[2013-04-24 15:29 UTC] ab@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 15:00:01 2025 UTC |
Description: ------------ Using PHP 5.4.3 with php_intl extension loaded... NumberFormatter->getPattern returns an incorrect pattern for currencies where the locale is somewhere that uses commas as the decimal. NumberFormatter->formatCurrency correctly places the dot and the comma, but the pattern returned by getPattern has these the wrong way round (see Test script). Test script: --------------- $fmt = new NumberFormatter('es', NumberFormatter::CURRENCY); echo $fmt->getPattern(); echo "<br>"; echo $fmt->formatCurrency(9999.99, 'EUR'); // displays as: // ¤ #,##0.00 // € 9.999,99 Expected result: ---------------- #.##0,00 € 9.999,99 Actual result: -------------- #,##0.00 € 9.999,99