Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: pkg/intl/lib/src/intl/number_format.dart

Issue 605343002: Per-mille parsing was dividing by 100, not 1000 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/intl/test/number_format_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/intl/number_format.dart
diff --git a/pkg/intl/lib/src/intl/number_format.dart b/pkg/intl/lib/src/intl/number_format.dart
index c00d5db2dccb7facee5db6c0389606cb10b0f844..e43b471c53b46e76291d5a68bd254f17b6505fc2 100644
--- a/pkg/intl/lib/src/intl/number_format.dart
+++ b/pkg/intl/lib/src/intl/number_format.dart
@@ -35,7 +35,7 @@ part of intl;
* There are four such constructors: decimalFormat, percentFormat,
* scientificFormat and currencyFormat. However, at the moment,
* scientificFormat prints only as equivalent to "#E0" and does not take
- * into account significant digits. The currencyFormat will default to the
+ * into account significant digits. The currencyFormat will default to the
* three-letter name of the currency if no explicit name/symbol is provided.
*/
class NumberFormat {
@@ -116,7 +116,7 @@ class NumberFormat {
NumberFormat.scientificPattern([String locale]) : this._forPattern(locale,
(x) => x.SCIENTIFIC_PATTERN);
- /**
+ /**
* Create a number format that prints as CURRENCY_PATTERN. If provided,
* use [nameOrSymbol] in place of the default currency name. e.g.
* var eurosInCurrentLocale = new NumberFormat
@@ -356,7 +356,7 @@ class NumberFormat {
* to print a thousands separator or other grouping character as appropriate
* to the locale. So we find how many places we are from the end of the number
* by subtracting our current [position] from the [totalLength] and printing
- * the separator character every [_groupingSize] digits, with the final
+ * the separator character every [_groupingSize] digits, with the final
* grouping possibly being of a different size, [_finalGroupingSize].
*/
void _group(int totalLength, int position) {
@@ -364,7 +364,7 @@ class NumberFormat {
if (distanceFromEnd <= 1 || _groupingSize <= 0) return;
if (distanceFromEnd == _finalGroupingSize + 1) {
_add(symbols.GROUP_SEP);
- } else if ((distanceFromEnd > _finalGroupingSize) &&
+ } else if ((distanceFromEnd > _finalGroupingSize) &&
(distanceFromEnd - _finalGroupingSize) % _groupingSize == 1) {
_add(symbols.GROUP_SEP);
}
@@ -499,7 +499,7 @@ class _NumberParser {
return '';
},
symbols.PERMILL: () {
- scale = 100;
+ scale = 1000;
Emily Fortuna 2014/09/26 18:01:50 whoops!
return '';
},
' ' : handleSpace,
« no previous file with comments | « no previous file | pkg/intl/test/number_format_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698