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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marcin at derlukiewicz dot pl
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2019 The PHP Group
All rights reserved.
Last updated: Sun Aug 18 11:01:27 2019 UTC