/libcore/luni/src/test/java/libcore/java/text/ |
D | DecimalFormatTest.java | 32 DecimalFormat df = new DecimalFormat("0E0"); in test_exponentSeparator() local 33 assertEquals("1E4", df.format(12345.)); in test_exponentSeparator() 35 DecimalFormatSymbols dfs = df.getDecimalFormatSymbols(); in test_exponentSeparator() 37 df.setDecimalFormatSymbols(dfs); in test_exponentSeparator() 38 assertEquals("1-useless-api-4", df.format(12345.)); in test_exponentSeparator() 42 DecimalFormat df = (DecimalFormat) DecimalFormat.getInstance(Locale.US); in test_setMaximumFractionDigitsAffectsRoundingMode() local 43 df.setMaximumFractionDigits(0); in test_setMaximumFractionDigitsAffectsRoundingMode() 44 df.setRoundingMode(RoundingMode.HALF_UP); in test_setMaximumFractionDigitsAffectsRoundingMode() 45 assertEquals("-0", df.format(-0.2)); in test_setMaximumFractionDigitsAffectsRoundingMode() 46 df.setMaximumFractionDigits(1); in test_setMaximumFractionDigitsAffectsRoundingMode() [all …]
|
D | OldDateFormatTest.java | 168 DateFormat df = DateFormat.getInstance(); in test_isLenient() local 169 Calendar c = df.getCalendar(); in test_isLenient() 170 if (df.isLenient()) { in test_isLenient() 381 DateFormat df = DateFormat.getInstance(); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition() local 387 Date result = (Date) df.parseObject(df.format(current), pp); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition() 401 char[] cur = df.format(current).toCharArray(); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition() 404 result = (Date) df.parseObject(partialCorrect, pp); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition() 411 char[] curDate = df.format(current).toCharArray(); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition() 416 result = (Date) df.parseObject(new String(newArray), pp); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition() 428 df.parseObject(df.format(current), null); in test_parseObjectLjava_lang_StringLjava_text_ParsePosition() [all …]
|
D | SimpleDateFormatTest.java | 410 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, new Locale("sl")); in test_sl_dates() local 411 df.setTimeZone(TimeZone.getTimeZone("UTC")); in test_sl_dates() 412 assertEquals("1. 1. 70", df.format(0L)); in test_sl_dates() 446 SimpleDateFormat df = new SimpleDateFormat("dd MMM yyyy HH:mm:ss zzz"); in testTimeZoneNotChangedByParse() local 447 df.setTimeZone(tz); in testTimeZoneNotChangedByParse() 448 df.parse("22 Jul 1977 12:23:45 HST"); in testTimeZoneNotChangedByParse() 449 assertEquals(tz, df.getTimeZone()); in testTimeZoneNotChangedByParse()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | DecimalFormatTest.java | 48 DecimalFormat df = new DecimalFormat(); in test_setNan_emptyString() local 49 df.setDecimalFormatSymbols(dfs); in test_setNan_emptyString() 50 df.format(Double.NaN); in test_setNan_emptyString() 339 DecimalFormat df = new DecimalFormat(); in test_parse_returnType() local 341 Number nb = df.parse("" + Long.MIN_VALUE, pos); in test_parse_returnType() 347 df = new DecimalFormat(); in test_parse_returnType() 349 nb = df.parse("" + Long.MAX_VALUE, pos); in test_parse_returnType() 356 df = new DecimalFormat(); in test_parse_returnType() 358 nb = df.parse("invalid", pos); in test_parse_returnType() 658 DecimalFormat df = new DecimalFormat(); in test_getNegativePrefix() local [all …]
|
D | ParseExceptionTest.java | 30 DateFormat df = DateFormat.getInstance(); in test_ConstructorLjava_lang_StringI() local 31 df.parse("HelloWorld"); in test_ConstructorLjava_lang_StringI() 43 DateFormat df = DateFormat.getInstance(); in test_getErrorOffset() local 44 df.parse("1999HelloWorld"); in test_getErrorOffset()
|
D | SimpleDateFormatTest.java | 215 SimpleDateFormat df = new SimpleDateFormat(); in test_equals_afterFormat() local 216 df.format(new Date()); in test_equals_afterFormat() 217 assertEquals(df, new SimpleDateFormat()); in test_equals_afterFormat() 518 SimpleDateFormat df = (SimpleDateFormat) DateFormat.getInstance(); in test_getDateFormatSymbols() local 519 DateFormatSymbols dfs = df.getDateFormatSymbols(); in test_getDateFormatSymbols() 520 assertTrue("Symbols identical", dfs != df.getDateFormatSymbols()); in test_getDateFormatSymbols() 785 SimpleDateFormat df = new SimpleDateFormat(pattern, new Locale("en", "US")); in assertParse() local 786 df.setTimeZone(TimeZone.getTimeZone("EST")); in assertParse() 787 Date date = df.parse(input); in assertParse() 792 SimpleDateFormat df = new SimpleDateFormat(pattern, new Locale("en", "US")); in assertFormat() local [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | ExpensiveObjectsBenchmark.java | 34 DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT); in timeNewDateFormatTimeInstance() local 35 df.format(System.currentTimeMillis()); in timeNewDateFormatTimeInstance() 40 DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT); in timeClonedDateFormatTimeInstance() local 42 ((DateFormat) df.clone()).format(System.currentTimeMillis()); in timeClonedDateFormatTimeInstance() 47 DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT); in timeReusedDateFormatTimeInstance() local 49 synchronized (df) { in timeReusedDateFormatTimeInstance() 50 df.format(System.currentTimeMillis()); in timeReusedDateFormatTimeInstance()
|
D | DecimalFormatBenchmark.java | 12 private static final DecimalFormat df = (DecimalFormat) DecimalFormat.getInstance(); field in DecimalFormatBenchmark 30 df.setGroupingSize(3); in formatWithGrouping() 31 df.setGroupingUsed(true); in formatWithGrouping() 33 df.format(obj); in formatWithGrouping() 46 df.format(obj); in format() 52 df.formatToCharacterIterator(obj); in formatToCharacterIterator()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_TestWebServer.java | 735 SimpleDateFormat df = new SimpleDateFormat("EE, dd MMM yyyy HH:mm:ss z"); in printHeaders() local 736 df.setTimeZone(TimeZone.getTimeZone("GMT")); in printHeaders() 740 psPrint(ps, "Date: " + df.format(new Date())); in printHeaders() 773 + df.format(exp) + " GMT"); in printHeaders() 795 + df.format(exp) + " GMT"); in printHeaders()
|
/libcore/ojluni/src/main/java/java/net/ |
D | HttpCookie.java | 1170 SimpleDateFormat df = new SimpleDateFormat(COOKIE_DATE_FORMATS[i], in expiryDate2DeltaSeconds() local 1173 df.setTimeZone(GMT); in expiryDate2DeltaSeconds() 1174 df.setLenient(false); in expiryDate2DeltaSeconds() 1175 df.set2DigitYearStart(cal.getTime()); in expiryDate2DeltaSeconds() 1177 cal.setTime(df.parse(dateString)); in expiryDate2DeltaSeconds()
|
/libcore/ojluni/src/main/java/java/text/ |
D | MessageFormat.java | 554 DateFormat df = DateFormat.getDateInstance(DATE_TIME_MODIFIERS[index], in toPattern() local 556 if (fmt.equals(df)) { in toPattern() 560 df = DateFormat.getTimeInstance(DATE_TIME_MODIFIERS[index], in toPattern() 562 if (fmt.equals(df)) { in toPattern()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Scanner.java | 1197 DecimalFormat df = in useLocale() local 1210 positivePrefix = df.getPositivePrefix(); in useLocale() 1213 negativePrefix = df.getNegativePrefix(); in useLocale() 1216 positiveSuffix = df.getPositiveSuffix(); in useLocale() 1219 negativeSuffix = df.getNegativeSuffix(); in useLocale()
|
D | Formatter.java | 4194 DecimalFormat df = (DecimalFormat) NumberFormat.getIntegerInstance(l); 4195 grpSize = df.getGroupingSize();
|
/libcore/dalvik/src/main/java/dalvik/system/ |
D | DexFile.java | 329 DFEnum(DexFile df) { in DFEnum() argument
|
/libcore/ojluni/src/main/java/sun/net/ftp/impl/ |
D | FtpClient.java | 110 private DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, java.util.Locale.US); field in FtpClient 258 d = df.parse(fdate); in parseLine() 295 private SimpleDateFormat df = new SimpleDateFormat("yyyyMMddhhmmss"); field in FtpClient.MLSxParser 333 d = df.parse(s); in parseLine() 344 d = df.parse(s); in parseLine()
|