twitter_cldr_js 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/lib/assets/javascripts/twitter_cldr/af.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ar.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/be.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/bg.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/bn.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ca.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/cs.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/cy.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/da.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/de-CH.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/de.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/el.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en-150.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en-AU.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en-CA.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en-GB.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en-IE.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en-SG.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en-ZA.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/en.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/es-419.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/es-CO.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/es-MX.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/es-US.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/es.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/eu.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/fa.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/fi.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/fil.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/fr-BE.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/fr-CA.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/fr-CH.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/fr.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ga.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/gl.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/he.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/hi.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/hr.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/hu.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/id.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/is.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/it-CH.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/it.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ja.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ko.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/lv.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/msa.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/nl.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/no.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/pl.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/pt.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ro.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ru.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/sk.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/sq.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/sr.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/sv.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ta.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/th.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/tr.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/uk.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/ur.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/vi.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/zh-cn.js +3 -1
- data/lib/assets/javascripts/twitter_cldr/zh-tw.js +3 -1
- data/lib/twitter_cldr/js/mustache/numbers/numbers.coffee +2 -1
- data/lib/twitter_cldr/js/version.rb +1 -1
- data/spec/js/numbers/currency.spec.js +4 -0
- data/spec/js/numbers/decimal.spec.js +4 -0
- data/spec/js/numbers/percent.spec.js +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2635c8e25f683d6ab38279e58bafaca8ffb645c
|
4
|
+
data.tar.gz: c1234cb0eb4988d3a22057e64284b321560a2218
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2ea718863ed95b17ef712d8fc624882dc88e19132d889efafbe15f7116a0ea822db1ac38983769aae5d32da446e4b67a830c7d46030b42f211108a2668c54bd
|
7
|
+
data.tar.gz: 688e08db84c84cc2a755a5c1d2057f5c4f8962079d60f907413334d315390b7ae73e75a926753760ea40ff46956aa651c834d2d6bc4548f98ac13c0e14db511c
|
data/History.txt
CHANGED
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -916,7 +916,9 @@
|
|
916
916
|
symbol: options.currency
|
917
917
|
};
|
918
918
|
}
|
919
|
-
|
919
|
+
if (options.precision == null) {
|
920
|
+
options.precision = this.defaults_for_currency(options.currency).digits;
|
921
|
+
}
|
920
922
|
} else {
|
921
923
|
currency = {
|
922
924
|
symbol: this.default_currency_symbol
|
@@ -106,7 +106,8 @@ class TwitterCldr.CurrencyFormatter extends TwitterCldr.NumberFormatter
|
|
106
106
|
else
|
107
107
|
currency = symbol: options.currency
|
108
108
|
|
109
|
-
options.precision
|
109
|
+
unless options.precision?
|
110
|
+
options.precision = @defaults_for_currency(options.currency).digits
|
110
111
|
else
|
111
112
|
currency = symbol: @default_currency_symbol
|
112
113
|
|
@@ -35,6 +35,10 @@ describe("CurrencyFormatter", function() {
|
|
35
35
|
expect(formatter.format(12.345, {currency: "JPY", precision: 1})).toEqual("¥12.3");
|
36
36
|
});
|
37
37
|
|
38
|
+
it("should allow a precision of zero", function() {
|
39
|
+
expect(formatter.format(12.3, {currency: "EUR", precision: 0})).toEqual("€12");
|
40
|
+
});
|
41
|
+
|
38
42
|
it("should use the cldr_symbol for the corresponding currency code if use_cldr_code is specified", function() {
|
39
43
|
TwitterCldr.Currencies.currencies = {
|
40
44
|
"JPY": {symbol: "¥", cldr_symbol: "YEN", currency: "JPY", "name": "Japanese yen"}
|
@@ -20,5 +20,9 @@ describe("DecimalFormatter", function() {
|
|
20
20
|
it("should respect the precision option", function() {
|
21
21
|
expect(formatter.format(-12, {precision: 3})).toEqual("-12.000");
|
22
22
|
});
|
23
|
+
|
24
|
+
it("should allow a precision of zero", function() {
|
25
|
+
expect(formatter.format(12.3, {precision: 0})).toEqual("12");
|
26
|
+
});
|
23
27
|
});
|
24
28
|
});
|
@@ -19,4 +19,8 @@ describe("PercentFormatter", function() {
|
|
19
19
|
it("should respect the precision option", function() {
|
20
20
|
expect(formatter.format(-12, {precision: 3})).toEqual("-12.000%");
|
21
21
|
});
|
22
|
+
|
23
|
+
it("should allow a precision of zero", function() {
|
24
|
+
expect(formatter.format(12.3, {precision: 0})).toEqual("12%");
|
25
|
+
});
|
22
26
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter_cldr_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|