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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 - 4 = ?
Subscribe to this entry?

 
 [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: Thu Dec 12 21:01:26 2019 UTC