Home
last modified time | relevance | path

Searched refs:df (Results 1 – 15 of 15) sorted by relevance

/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java32 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 …]
DOldDateFormatTest.java168 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 …]
DSimpleDateFormatTest.java458 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, new Locale("sl")); in test_sl_dates() local
459 assertEquals(TimeZone.getDefault(), df.getTimeZone()); in test_sl_dates()
460 df.setTimeZone(UTC); in test_sl_dates()
461 assertEquals("1. 1. 70", df.format(0L)); in test_sl_dates()
494 SimpleDateFormat df = new SimpleDateFormat("dd MMM yyyy HH:mm:ss zzz"); in testTimeZoneNotChangedByParse() local
495 df.setTimeZone(UTC); in testTimeZoneNotChangedByParse()
496 df.parse("22 Jul 1977 12:23:45 HST"); in testTimeZoneNotChangedByParse()
497 assertEquals(UTC, df.getTimeZone()); in testTimeZoneNotChangedByParse()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatTest.java48 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 …]
DParseExceptionTest.java32 DateFormat df = DateFormat.getInstance(); in test_ConstructorLjava_lang_StringI() local
33 df.parse("HelloWorld"); in test_ConstructorLjava_lang_StringI()
45 DateFormat df = DateFormat.getInstance(); in test_getErrorOffset() local
46 df.parse("1999HelloWorld"); in test_getErrorOffset()
DSimpleDateFormatTest.java215 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()
787 SimpleDateFormat df = new SimpleDateFormat(pattern, new Locale("en", "US")); in assertParse() local
788 df.setTimeZone(TimeZone.getTimeZone("EST")); in assertParse()
789 Date date = df.parse(input); in assertParse()
794 SimpleDateFormat df = new SimpleDateFormat(pattern, new Locale("en", "US")); in assertFormat() local
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DExpensiveObjectsBenchmark.java34 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()
DDecimalFormatBenchmark.java12 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/ojluni/src/test/java/time/test/java/time/format/
DTestReducedParser.java414 DateTimeFormatter df in test_reducedWithChronoYear() local
419 String input = df.format(date); in test_reducedWithChronoYear()
422 TemporalAccessor parsed = df.parseUnresolved(input, pos); in test_reducedWithChronoYear()
432 DateTimeFormatter df in test_reducedWithChronoYearOfEra() local
437 String input = df.format(date); in test_reducedWithChronoYearOfEra()
440 TemporalAccessor parsed = df.parseUnresolved(input, pos); in test_reducedWithChronoYearOfEra()
451 DateTimeFormatter df in test_reducedWithLateChronoChange() local
458 String input = df.format(date); in test_reducedWithLateChronoChange()
461 TemporalAccessor parsed = df.parseUnresolved(input, pos); in test_reducedWithLateChronoChange()
473 DateTimeFormatter df in test_reducedWithLateChronoChangeTwice() local
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_TestWebServer.java737 SimpleDateFormat df = new SimpleDateFormat("EE, dd MMM yyyy HH:mm:ss z"); in printHeaders() local
738 df.setTimeZone(TimeZone.getTimeZone("GMT")); in printHeaders()
742 psPrint(ps, "Date: " + df.format(new Date())); in printHeaders()
775 + df.format(exp) + " GMT"); in printHeaders()
797 + df.format(exp) + " GMT"); in printHeaders()
/libcore/ojluni/src/main/java/java/text/
DMessageFormat.java554 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/dalvik/src/main/java/dalvik/system/
DDexFile.java323 DFEnum(DexFile df) { in DFEnum() argument
325 mNameList = getClassNameList(df.mCookie); in DFEnum()
/libcore/ojluni/src/main/java/sun/net/ftp/impl/
DFtpClient.java109 private DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, java.util.Locale.US); field in FtpClient
257 d = df.parse(fdate); in parseLine()
294 private SimpleDateFormat df = new SimpleDateFormat("yyyyMMddhhmmss"); field in FtpClient.MLSxParser
332 d = df.parse(s); in parseLine()
343 d = df.parse(s); in parseLine()
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestUmmAlQuraChronology.java468 …DateTimeFormatter df = DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG).withChronology(Chronolo… in test_formatterOfLocalizedDate() local
469 assertEquals(df.format(hdt), expected); in test_formatterOfLocalizedDate()
/libcore/ojluni/src/main/java/java/util/
DFormatter.java4462 DecimalFormat df = (DecimalFormat) NumberFormat.getIntegerInstance(l);
4463 grpSize = df.getGroupingSize();
4469 if (!df.isGroupingUsed() || df.getGroupingSize() == 0) {