php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69920 Currency Formatter ignores fraction digits
Submitted: 2015-06-24 11:07 UTC Modified: 2015-06-24 17:32 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: marcin at derlukiewicz dot pl Assigned: cmb (profile)
Status: Duplicate Package: intl (PECL)
PHP Version: 5.6.10 OS: any
Private report: No CVE-ID: None
 [2015-06-24 11:07 UTC] marcin at derlukiewicz dot pl
Description:
------------
Currency Formatter ignores fraction digits attribute
Tested this on windows with ICU version	54.1
and on ubuntu15 with ICU version 52.1 
php 5.6.10 in all cases.

there was similar old error here: https://bugs.php.net/bug.php?id=63140
but it looks that version of ICU is higher then noted there...

Test script:
---------------
$fmt = new \NumberFormatter( 'pl_PL', \NumberFormatter::CURRENCY);
$fmt->setAttribute(\NumberFormatter::FRACTION_DIGITS, 0);
echo $fmt->formatCurrency((float)44,'EUR');

Expected result:
----------------
44 €

Actual result:
--------------
44,00 €

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-24 17:32 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-06-24 17:32 UTC] cmb@php.net
This is the same issue that has been reported in bug #65572.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC