> And sorry for passing you up on the review

Don't worry :-)


> I wasn't sure if you were still contributing to Chromium/V8

I do / don't. Not part of my job now, but if I can help...


> I saw on NumberFormat/DecimalFormat there is a setCurrency() method...
> but I couldn't tell if that actually impacted the fractional digits.

Yes, it does :-)
    double value = 54306.4047970;
    NumberFormat cf = NumberFormat.getCurrencyInstance(ULocale.US);
    System.out.println(cf.format(value));
    cf.setCurrency(Currency.getInstance("JPY"));
    System.out.println(cf.format(value));
(Java because I was lazy, but C++ does the same)

Gives:
    $54,306.40
    ¥54,306


Mihai


On Fri, Jul 17, 2015 at 9:05 AM, <[email protected]> wrote:

> On 2015/07/17 16:02:39, mnita wrote:
>
>> Apologies, I have missed the line above [ if (style ==
>> UNICODE_STRING_SIMPLE("currency")) ]
>> :-(
>>
>
>  Puzzling thing is: why do we even have to do this?
>> ICU gives the right results, I have tested it outside v8.
>> I should probably download + build v8 and see what's going on.
>> Just reading this code does not seem enough for me, right now.
>> Or it is just Friday morning, and my brain is not fully awake...
>>
>
> Good morning. :) And sorry for passing you up on the review, I wasn't sure
> if
> you were still contributing to Chromium/V8. I'll make sure to send any
> further
> patches your way.
>
> I think it's because we only pass the locale to ICU, not the currency. I
> saw on
> NumberFormat/DecimalFormat there is a setCurrency() method... but I
> couldn't
> tell if that actually impacted the fractional digits. I figured this would
> be an
> okay way of doing it, but if there's a better way...
>
> https://codereview.chromium.org/1231613006/
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to