CNumberFormatter bug?

Hi Everyone,

I have this issue with CNumberFormatter.

<?php $nf = new CNumberFormatter('es_mx');  ?>


<?php echo $nf->format('###,##0.00', '72000.00' ); ?>


#Echoes 72.000,000 instead of 72,000.00

What am I doing wrong?


It is a bug!

Changed it to en_us (Same formatting as Mexico) and it worked correctly.

it is NOT a bug. coma in format string means only where thousand separator should be placed. dot means only where decimal separator should be placed. both thousand separator and decimal separators are defined by locale (elsewhere).

Thanks for the reply red!

The thing here is that "en_us" has the same behavior than "es_mx" . However "es_mx" shows this formatting the wrong way.