Lines Matching defs:currency

35 // [[Style]] is one of the values "decimal", "percent", "currency",
40 // or "narrowSymbol" identifying the display of the currency number format.
51 // "currency" and when [[SignDisplay]] is not "never".
342 // The currency is expected to an all upper case string value.
343 int CurrencyDigits(const icu::UnicodeString& currency) {
346 reinterpret_cast<const UChar*>(currency.getBuffer()), &status);
347 // For missing currency codes, default to the most common, 2
356 bool IsWellFormedCurrencyCode(const std::string& currency) {
357 // Verifies that the input is a well-formed ISO 4217 currency code.
358 // ecma402/#sec-currency-codes
360 if (currency.length() != 3) return false;
361 // 1. Let normalized be the result of mapping currency to upper case as
370 return (IsAToZ(currency[0]) && IsAToZ(currency[1]) && IsAToZ(currency[2]));
392 // "currency/TWD .00 rounding-mode-half-up unit-width-iso-code"
397 // "currency/TWD .00 rounding-mode-half-up unit-width-full-name;"
402 // "currency/TWD .00 rounding-mode-half-up unit-width-narrow;
406 // Ex: skeleton as "currency/TWD .00 rounding-mode-half-up"
444 // Parse currency code from skeleton. For example, skeleton as
445 // "currency/TWD .00 rounding-mode-half-up unit-width-full-name;"
448 const char currency[] = "currency/";
449 int32_t index = skeleton.indexOf(currency);
451 index += static_cast<int32_t>(std::strlen(currency));
471 // "currency/TWD .00 rounding-mode-half-up sign-accounting-always" OR
472 // "currency/TWD .00 rounding-mode-half-up sign-accounting-except-zero"
552 // "currency/TWD .00 rounding-mode-half-up sign-never"
558 // "currency/TWD .00 rounding-mode-half-up sign-accounting-always"
564 // "currency/TWD .00 rounding-mode-half-up sign-accounting-except-zero" or
565 // "currency/TWD .00 rounding-mode-half-up sign-except-zero"
572 // "currency/TWD .00 rounding-mode-half-up sign-accounting-negative"
688 // “currency/TWD .00 rounding-mode-half-up integer-width/*000000000000000”
807 if (skeleton.indexOf("currency/") >= 0) {
937 // [[Currency]] "currency"
1220 // "percent", "currency", "unit" », "decimal").
1224 {"decimal", "percent", "currency", "unit"},
1232 // 5. Let currency be ? GetOption(options, "currency", "string", undefined,
1237 isolate, options, "currency", empty_values, service, &currency_cstr);
1240 std::string currency;
1241 // 6. If currency is not undefined, then
1244 currency = currency_cstr.get();
1245 // 6. a. If the result of IsWellFormedCurrencyCode(currency) is false,
1247 if (!IsWellFormedCurrencyCode(currency)) {
1251 factory->NewStringFromStaticChars("currency code"),
1252 factory->NewStringFromAsciiChecked(currency.c_str())),
1256 // 7. If style is "currency" and currency is undefined, throw a TypeError
1331 // 14. If style is "currency", then
1334 // 14.a. If currency is undefined, throw a TypeError exception.
1339 // 14.a. Let currency be the result of converting currency to upper case as
1341 std::transform(currency.begin(), currency.end(), currency.begin(), toupper);
1342 currency_ustr = currency.c_str();
1344 // 14.b. Set numberFormat.[[Currency]] to currency.
1392 // 16. If style is "currency", then
1395 // b. Let cDigits be CurrencyDigits(currency).
1769 // var nf = new Intl.NumberFormat(['de'], {style:'currency',currency:'EUR'});