Commit Graph

2 Commits

Author SHA1 Message Date
littledan
f5e924eb10 Fix user options for fractional digits in Intl.NumberFormatter
The patch in https://crrev.com/ddb5c2d999c5ee6e31c4a9599bb3ddb293cc3f49
moved all fractional digit settings to default values due to a coding
error. These were not even correct default values, and users observed
errors where percentages were written as "23.0%" instead of "23%".

This patch fixes the setting propagation when appropriate and it changes
the default max fractional digits of a percentage to 0, per spec.

BUG=chromium:544122
R=mnita,jochen
CC=hichris123,adamk
LOG=Y

Review URL: https://codereview.chromium.org/1420883002

Cr-Commit-Position: refs/heads/master@{#31468}
2015-10-22 11:31:13 +00:00
hichris123
ddb5c2d999 Make NumberFormat use the ICU currency data, fix bug in NumberFormat
NumberFormat previously just used a min of 0 digits after the decimal and a max of 3. This CL changes it so that we use the ICU currency data, and set the min and max to the number of numbers after the decimal point for each currency.

This CL also fixes a small bug where if the minimum fraction digits is above 3 but the maximum fraction digits isn't set, then it returns with only three numbers after the decimal point.

BUG=435465,473104,304722
LOG=Y

Review URL: https://codereview.chromium.org/1231613006

Cr-Commit-Position: refs/heads/master@{#29734}
2015-07-17 15:08:08 +00:00