/external/v8/test/intl/number-format/ |
format-currency.js | 8 var nf_USD = new Intl.NumberFormat(['en'], {style: 'currency', currency: 'USD'}); 12 var nf_JPY = new Intl.NumberFormat(['ja'], 17 var nf_EUR = new Intl.NumberFormat(['pt'], {style: 'currency', currency: 'EUR'});
|
check-minimum-fraction-digits.js | 7 var nf = new Intl.NumberFormat("en-us", { useGrouping: false, minimumFractionDigits: 4, maximumFractionDigits: 8}); 14 nf = new Intl.NumberFormat("en-us", { useGrouping: false, minimumFractionDigits: 4, maximumFractionDigits: 8, style: 'percent'}); 21 nf = new Intl.NumberFormat('en', {minimumFractionDigits: 4, maximumFractionDigits: 8, style: 'currency', currency: 'USD'}); 29 nf = new Intl.NumberFormat("en-us", { useGrouping: false }); 37 nf = new Intl.NumberFormat("en-us", { useGrouping: false, style: 'percent'}); 47 nf = new Intl.NumberFormat('en', {minimumFractionDigits: 0, style: 'currency', currency: 'USD'}); 53 nf = new Intl.NumberFormat('en', {maximumFractionDigits: 3, style: 'currency', currency: 'USD'});
|
/external/v8/test/intl/general/ |
mapped-locale.js | 30 var nf = Intl.NumberFormat(['zh-TW'], {localeMatcher: 'lookup'}); 33 var nf = Intl.NumberFormat(['zh-Hant-TW'], {localeMatcher: 'lookup'}); 36 var nf = Intl.NumberFormat(['zh-Hant'], {localeMatcher: 'lookup'}); 39 nf = Intl.NumberFormat(['zh'], {localeMatcher: 'lookup'}); 42 nf = Intl.NumberFormat(['zh-CN'], {localeMatcher: 'lookup'}); 45 nf = Intl.NumberFormat(['zh-Hans-CN'], {localeMatcher: 'lookup'}); 48 nf = Intl.NumberFormat(['zh-Hans'], {localeMatcher: 'lookup'}); 51 nf = Intl.NumberFormat(['en-US'], {localeMatcher: 'lookup'});
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/ |
AbstractFormat.java | 22 import java.text.NumberFormat; 34 public abstract class AbstractFormat extends NumberFormat implements Serializable { 40 protected NumberFormat denominatorFormat; 43 protected NumberFormat numeratorFormat; 58 protected AbstractFormat(final NumberFormat format) { 59 this(format, (NumberFormat) format.clone()); 68 protected AbstractFormat(final NumberFormat numeratorFormat, 69 final NumberFormat denominatorFormat) { 76 * {@link NumberFormat#getNumberInstance(java.util.Locale)} with the only 80 protected static NumberFormat getDefaultNumberFormat() [all...] |
/external/icu/icu4c/source/i18n/ |
numfmt.cpp | 105 const int32_t icu::NumberFormat::gDefaultMaxIntegerDigits = 2000000000; 106 const int32_t icu::NumberFormat::gDefaultMinIntegerDigits = 127; 157 // Static hashtable cache of NumberingSystem objects used by NumberFormat 195 // class NumberFormat 200 UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(NumberFormat) 232 NumberFormat::NumberFormat() 247 NumberFormat::~NumberFormat() 258 NumberFormat::NumberFormat(const NumberFormat &source [all...] |
plurfmt.cpp | 38 numberFormat(NULL), 46 numberFormat(NULL), 54 numberFormat(NULL), 64 numberFormat(NULL), 74 numberFormat(NULL), 83 numberFormat(NULL), 94 numberFormat(NULL), 105 numberFormat(NULL), 117 numberFormat(NULL), 129 numberFormat(NULL) [all...] |
unum.cpp | 49 NumberFormat *retVal = NULL; 61 retVal = NumberFormat::createInstance(Locale(locale), style, *status); 142 delete (NumberFormat*) fmt; 153 const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt); 205 ((const NumberFormat*)fmt)->format(number, res, fp, *status); 238 ((const NumberFormat*)fmt)->format(number, res, fp, *status); 282 ((const NumberFormat*)fmt)->format(numFmtbl, resultStr, fp, *status); 321 ((const NumberFormat*)fmt)->format(n, res, fp, *status); 348 ((const NumberFormat*)fmt)->parse(src, res, pp) [all...] |
/libcore/luni/src/test/java/libcore/java/text/ |
DecimalFormatTest.java | 25 import java.text.NumberFormat; 52 NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); 53 numberFormat.setGroupingUsed(false); 54 numberFormat.setMinimumIntegerDigits(400); 58 assertEquals(309, numberFormat.format(123).length()); 59 assertEquals(309, numberFormat.format(BigInteger.valueOf(123)).length()); 65 NumberFormat pf = NumberFormat.getPercentInstance() [all...] |
OldNumberFormatFieldTest.java | 25 import java.text.NumberFormat; 50 NumberFormat.Field nfield = NumberFormat.Field.CURRENCY; 58 NumberFormat.Field nfield2 = (NumberFormat.Field) in.readObject(); 71 static class MyNumberFormat extends NumberFormat.Field {
|
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/ |
NumberFormat.java | 24 * {@icuenhanced java.text.NumberFormat}.{@icu _usage_} 26 * <code>NumberFormat</code> is the abstract base class for all number 28 * numbers. <code>NumberFormat</code> also provides methods for determining 31 * <code>NumberFormat</code> helps you to format and parse numbers for any locale. 41 * myString = NumberFormat.getInstance().format(myNumber); 50 * NumberFormat nf = NumberFormat.getInstance(); 60 * NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); 63 * You can also use a <code>NumberFormat</code> to parse numbers [all...] |
/libcore/ojluni/src/main/java/java/text/spi/ |
NumberFormatProvider.java | 28 import java.text.NumberFormat; 35 * {@link java.text.NumberFormat NumberFormat} class. 49 * Returns a new <code>NumberFormat</code> instance which formats 59 * @see java.text.NumberFormat#getCurrencyInstance(java.util.Locale) 61 public abstract NumberFormat getCurrencyInstance(Locale locale); 64 * Returns a new <code>NumberFormat</code> instance which formats 71 * java.text.NumberFormat#isParseIntegerOnly isParseIntegerOnly}). 80 * @see java.text.NumberFormat#getIntegerInstance(java.util.Locale) 82 public abstract NumberFormat getIntegerInstance(Locale locale) [all...] |
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
ScientificNumberFormatterTest.java | 12 import android.icu.text.NumberFormat; 54 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); 67 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); 78 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); 88 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH);
|
NumberFormatRoundTripTest.java | 20 import android.icu.text.NumberFormat; 25 * Performs round-trip tests for NumberFormat 45 NumberFormat fmt = null; 50 fmt = NumberFormat.getInstance(); 54 fmt = NumberFormat.getCurrencyInstance(); 58 fmt = NumberFormat.getPercentInstance(); 63 final Locale[] loc = NumberFormat.getAvailableLocales(); 72 fmt = NumberFormat.getInstance(loc[i]); 75 fmt = NumberFormat.getCurrencyInstance(loc[i]); 78 fmt = NumberFormat.getPercentInstance(loc[i]) [all...] |
NumberFormatRegressionTest.java | 27 import android.icu.text.NumberFormat; 47 NumberFormat nf = NumberFormat.getInstance(Locale.US); 61 * NumberFormat objects. 74 // create a NumberFormat for this locale 75 NumberFormat nf = NumberFormat.getInstance(loc); 107 NumberFormat nf1 = NumberFormat.getIntegerInstance(); 108 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA) [all...] |
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
ScientificNumberFormatterTest.java | 11 import com.ibm.icu.text.NumberFormat; 50 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); 63 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getScientificInstance(ULocale.ENGLISH); 74 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH); 84 DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH);
|
NumberFormatRoundTripTest.java | 19 import com.ibm.icu.text.NumberFormat; 22 * Performs round-trip tests for NumberFormat 41 NumberFormat fmt = null; 46 fmt = NumberFormat.getInstance(); 50 fmt = NumberFormat.getCurrencyInstance(); 54 fmt = NumberFormat.getPercentInstance(); 59 final Locale[] loc = NumberFormat.getAvailableLocales(); 68 fmt = NumberFormat.getInstance(loc[i]); 71 fmt = NumberFormat.getCurrencyInstance(loc[i]); 74 fmt = NumberFormat.getPercentInstance(loc[i]) [all...] |
NumberFormatRegressionTest.java | 26 import com.ibm.icu.text.NumberFormat; 43 NumberFormat nf = NumberFormat.getInstance(Locale.US); 57 * NumberFormat objects. 70 // create a NumberFormat for this locale 71 NumberFormat nf = NumberFormat.getInstance(loc); 103 NumberFormat nf1 = NumberFormat.getIntegerInstance(); 104 NumberFormat nf2 = NumberFormat.getIntegerInstance(Locale.CHINA) [all...] |
/external/icu/icu4c/source/samples/numfmt/ |
main.cpp | 44 * Sample code for the C++ API to NumberFormat. 51 NumberFormat *fmt = NumberFormat::createInstance(us, status); 52 check(status, "NumberFormat::createInstance"); 59 check(status, "NumberFormat::parse"); 61 printf("NumberFormat::parse(\""); // Display the result 71 check(status, "NumberFormat::format"); 73 printf("NumberFormat::format("); // Display the result 86 * Set a currency on a NumberFormat with pre-ICU 2.6 APIs. 90 * @param nf The NumberFormat on which to set the currency; takes effect o [all...] |
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/jdkadapter/ |
DecimalFormatICU.java | 22 import com.ibm.icu.text.NumberFormat; 396 // Methods overriding java.text.NumberFormat 423 if (icuAttribute == NumberFormat.Field.CURRENCY) { 424 jdkAttribute = java.text.NumberFormat.Field.CURRENCY; 425 } else if (icuAttribute == NumberFormat.Field.DECIMAL_SEPARATOR) { 426 jdkAttribute = java.text.NumberFormat.Field.DECIMAL_SEPARATOR; 427 } else if (icuAttribute == NumberFormat.Field.EXPONENT) { 428 jdkAttribute = java.text.NumberFormat.Field.EXPONENT; 429 } else if (icuAttribute == NumberFormat.Field.EXPONENT_SIGN) { 430 jdkAttribute = java.text.NumberFormat.Field.EXPONENT_SIGN [all...] |
/external/icu/icu4c/source/test/intltest/ |
plurfmts.h | 37 NumberFormat *numFmt, 42 UBool overwrite, // overwrite the numberFormat.format result
|
tsnmfmt.h | 22 * NumberFormat. 42 * test NumberFormat::getAvailableLocales 54 NumberFormat* fFormat;
|
/external/icu/icu4j/demos/src/com/ibm/icu/dev/demo/number/ |
CurrencyDemo.java | 19 import com.ibm.icu.text.NumberFormat; 33 static NumberFormat getCurrencyFormat(Currency currency, 38 NumberFormat result = NumberFormat.getCurrencyInstance(displayLocale); 44 DecimalFormat result = (DecimalFormat)NumberFormat.getCurrencyInstance(displayLocale); 81 Locale[] testLocales = NumberFormat.getAvailableLocales(); 91 NumberFormat nf26 = getCurrencyFormat(Currency.getInstance(testCurrencies[j]), testLocales[i], true); 96 NumberFormat nf24 = getCurrencyFormat(Currency.getInstance(testCurrencies[j]), testLocales[i], false);
|
/libcore/benchmarks/src/benchmarks/regression/ |
ExpensiveObjectsBenchmark.java | 23 import java.text.NumberFormat; 96 NumberFormat.getInstance(Locale.US); 101 NumberFormat nf = NumberFormat.getInstance(Locale.US); 108 NumberFormat nf = NumberFormat.getInstance(Locale.US); 121 NumberFormat nf = NumberFormat.getInstance(Locale.US);
|
/external/caliper/examples/src/main/java/examples/ |
ExpensiveObjectsBenchmark.java | 21 import java.text.NumberFormat; 45 NumberFormat.getInstance(Locale.US); 50 NumberFormat nf = NumberFormat.getInstance(Locale.US);
|
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/icuadapter/ |
NumberFormatJDK.java | 11 import java.text.NumberFormat; 21 * NumberFormatJDK is an adapter class which wraps java.text.NumberFormat and 22 * implements ICU4J NumberFormat APIs. 24 public class NumberFormatJDK extends com.ibm.icu.text.NumberFormat { 28 private NumberFormat fJdkNfmt; 30 private NumberFormatJDK(NumberFormat jdkNfmt) { 34 public static com.ibm.icu.text.NumberFormat wrap(NumberFormat jdkNfmt) { 41 public NumberFormat unwrap() { 48 other.fJdkNfmt = (NumberFormat)fJdkNfmt.clone() [all...] |