/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | DateFormatTest.java | 19 import java.text.DateFormat; 37 DateFormat format = DateFormat.getInstance(); in test_clone() 38 DateFormat clone = (DateFormat) format.clone(); in test_clone() 52 Locale[] locales = DateFormat.getAvailableLocales(); in test_getAvailableLocales() 71 DateFormat format = DateFormat.getInstance(); in test_getCalendar() 81 SimpleDateFormat f2 = (SimpleDateFormat) DateFormat.getDateInstance(); in test_getDateInstance() 83 assertTrue("Wrong default", f2.equals(DateFormat.getDateInstance( in test_getDateInstance() 84 DateFormat.DEFAULT, Locale.getDefault()))); in test_getDateInstance() 95 DateFormat.DEFAULT == DateFormat.MEDIUM); in test_getDateInstanceI() 97 SimpleDateFormat f2 = (SimpleDateFormat) DateFormat in test_getDateInstanceI() [all …]
|
D | FieldPositionTest.java | 19 import java.text.DateFormat; 29 FieldPosition fpos = new FieldPosition(DateFormat.MONTH_FIELD); in test_ConstructorI() 31 DateFormat.MONTH_FIELD, fpos.getField()); in test_ConstructorI() 41 FieldPosition fpos = new FieldPosition(DateFormat.Field.MONTH); in test_ConstructorLjava_text_Format$Field() 43 DateFormat.Field.MONTH, fpos.getFieldAttribute()); in test_ConstructorLjava_text_Format$Field() 53 FieldPosition fpos = new FieldPosition(DateFormat.Field.MONTH, in test_ConstructorLjava_text_Format$FieldI() 54 DateFormat.MONTH_FIELD); in test_ConstructorLjava_text_Format$FieldI() 56 DateFormat.Field.MONTH, fpos.getFieldAttribute()); in test_ConstructorLjava_text_Format$FieldI() 58 DateFormat.MONTH_FIELD, fpos.getField()); in test_ConstructorLjava_text_Format$FieldI() 61 FieldPosition fpos2 = new FieldPosition(DateFormat.Field.HOUR1, in test_ConstructorLjava_text_Format$FieldI() [all …]
|
D | DataFormatFieldTest.java | 27 import java.text.DateFormat; 28 import java.text.DateFormat.Field; 43 DateFormat.Field realField = DateFormat.Field in test_ConstructorLjava_lang_StringLjava_lang_String() 46 DateFormat.Field.ERA, realField); in test_ConstructorLjava_lang_StringLjava_lang_String() 48 DateFormat.Field realField2 = DateFormat.Field in test_ConstructorLjava_lang_StringLjava_lang_String() 51 DateFormat.Field.DAY_OF_MONTH, realField2); in test_ConstructorLjava_lang_StringLjava_lang_String() 54 static class MyField extends DateFormat.Field { 76 DateFormat.Field realField = DateFormat.Field in test_ConstructorLjava_lang_StringI() 79 DateFormat.Field.DAY_OF_WEEK, realField); in test_ConstructorLjava_lang_StringI() 92 DateFormat.Field realField = DateFormat.Field in test_Constructor2() [all …]
|
D | SimpleDateFormatTest.java | 19 import java.text.DateFormat; 50 assertTrue("Wrong default", f2.equals(DateFormat.getDateTimeInstance( in test_Constructor() 51 DateFormat.SHORT, DateFormat.SHORT, Locale.getDefault()))); in test_Constructor() 206 SimpleDateFormat format = (SimpleDateFormat) DateFormat.getInstance(); in test_equalsLjava_lang_Object() 221 SimpleDateFormat format = (SimpleDateFormat) DateFormat.getInstance(); in test_hashCode() 258 assertFormat(format, " G", cal, " AD", DateFormat.ERA_FIELD); in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 259 assertFormat(format, " GG", cal, " AD", DateFormat.ERA_FIELD); in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 260 assertFormat(format, " GGG", cal, " AD", DateFormat.ERA_FIELD); in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 262 DateFormat.ERA_FIELD); in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 266 assertFormat(format, " y", cal, " 1999", DateFormat.YEAR_FIELD); in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() [all …]
|
D | MessageFormatTest.java | 26 import java.text.DateFormat; 116 f1.setFormat(0, DateFormat.getTimeInstance()); in test_setFormatILjava_text_Format() 117 f1.setFormat(1, DateFormat.getTimeInstance()); in test_setFormatILjava_text_Format() 121 f1.setFormat(5, DateFormat.getTimeInstance()); in test_setFormatILjava_text_Format() 127 DateFormat.getTimeInstance(), in test_setFormatILjava_text_Format() 128 DateFormat.getTimeInstance(), in test_setFormatILjava_text_Format() 132 DateFormat.getTimeInstance() in test_setFormatILjava_text_Format() 142 f1.setFormat(-1, DateFormat.getDateInstance()); in test_setFormatILjava_text_Format() 147 f1.setFormat(f1.getFormats().length, DateFormat.getDateInstance()); in test_setFormatILjava_text_Format() 188 DateFormat.is24Hour = null; in test_parseLjava_lang_String() [all …]
|
D | Support_MessageFormat.java | 22 import java.text.DateFormat; 52 DateFormat.is24Hour = null; in t_format_with_FieldPosition() 68 t_FormatWithField(2, format, objects, null, DateFormat.Field.AM_PM, 0, in t_format_with_FieldPosition() 74 t_FormatWithField(4, format, objects, null, DateFormat.Field.ERA, 0, 0); in t_format_with_FieldPosition() 81 DateFormat.is24Hour = null; in t_formatToCharacterIterator() 95 v.add(new FieldContainer(3, 6, DateFormat.Field.MONTH)); in getMessageVector1() 98 v.add(new FieldContainer(7, 9, DateFormat.Field.DAY_OF_MONTH)); in getMessageVector1() 101 v.add(new FieldContainer(11, 15, DateFormat.Field.YEAR)); in getMessageVector1() 103 v.add(new FieldContainer(19, 20, DateFormat.Field.HOUR1)); in getMessageVector1() 106 v.add(new FieldContainer(21, 23, DateFormat.Field.MINUTE)); in getMessageVector1() [all …]
|
D | ParseExceptionTest.java | 21 import java.text.DateFormat; 32 DateFormat df = DateFormat.getInstance(); in test_ConstructorLjava_lang_StringI() 45 DateFormat df = DateFormat.getInstance(); in test_getErrorOffset()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | DateFormatTest.java | 28 import java.text.DateFormat; 42 Boolean originalIs24Hour = DateFormat.is24Hour; in testIs24Hour_notCached() 45 DateFormat.is24Hour = null; // null == locale default (12 hour for US) in testIs24Hour_notCached() 46 checkTimePattern(DateFormat.SHORT, "h:mm" + sep + "a"); in testIs24Hour_notCached() 47 checkTimePattern(DateFormat.MEDIUM, "h:mm:ss" + sep + "a"); in testIs24Hour_notCached() 49 DateFormat.is24Hour = true; // Explicit 24 hour. in testIs24Hour_notCached() 50 checkTimePattern(DateFormat.SHORT, "HH:mm"); in testIs24Hour_notCached() 51 checkTimePattern(DateFormat.MEDIUM, "HH:mm:ss"); in testIs24Hour_notCached() 53 DateFormat.is24Hour = false; // Explicit 12 hour. in testIs24Hour_notCached() 54 checkTimePattern(DateFormat.SHORT, "h:mm" + sep + "a"); in testIs24Hour_notCached() [all …]
|
D | OldDateFormatTest.java | 21 import java.text.DateFormat; 33 private class MockDateFormat extends DateFormat { 73 DateFormat format = DateFormat.getInstance(); in test_equalsLjava_lang_Object() 74 DateFormat clone = (DateFormat) format.clone(); in test_equalsLjava_lang_Object() 77 .equals(DateFormat.getTimeInstance())); in test_equalsLjava_lang_Object() 92 DateFormat.is24Hour = null; in test_formatLjava_util_Date() 93 DateFormat format = DateFormat.getDateTimeInstance( in test_formatLjava_util_Date() 94 DateFormat.SHORT, DateFormat.SHORT, Locale.US); in test_formatLjava_util_Date() 115 DateFormat.is24Hour = null; in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 116 DateFormat format = DateFormat.getDateTimeInstance( in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() [all …]
|
D | AttributedCharacterIteratorAttributeTest.java | 22 import java.text.DateFormat; 35 assertSameReserialized(DateFormat.Field.ERA); in testSerialization() 36 assertSameReserialized(DateFormat.Field.TIME_ZONE); in testSerialization()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | SimpleDateFormatData.java | 20 import java.text.DateFormat; 61 android.icu.text.DateFormat.NONE, android.icu.text.DateFormat.FULL); in SimpleDateFormatData() 75 android.icu.text.DateFormat.NONE, android.icu.text.DateFormat.LONG); in SimpleDateFormatData() 77 android.icu.text.DateFormat.NONE, android.icu.text.DateFormat.MEDIUM); in SimpleDateFormatData() 79 android.icu.text.DateFormat.NONE, android.icu.text.DateFormat.SHORT); in SimpleDateFormatData() 81 android.icu.text.DateFormat.FULL, android.icu.text.DateFormat.NONE); in SimpleDateFormatData() 83 android.icu.text.DateFormat.LONG, android.icu.text.DateFormat.NONE); in SimpleDateFormatData() 85 android.icu.text.DateFormat.MEDIUM, android.icu.text.DateFormat.NONE); in SimpleDateFormatData() 87 android.icu.text.DateFormat.SHORT, android.icu.text.DateFormat.NONE); in SimpleDateFormatData() 135 case DateFormat.SHORT: in getDateFormat() [all …]
|
D | DateIntervalFormat.java | 25 import java.text.DateFormat; 75 if (DateFormat.is24Hour == null || DateFormat.is24Hour) { in formatDateRange()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | DateFormatBenchmark.java | 21 import java.text.DateFormat; 41 DateFormat.getDateTimeInstance(); in timeGetDateTimeInstance() 47 DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale1); in timeGetDateTimeInstance_multiple() 48 DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale2); in timeGetDateTimeInstance_multiple() 49 DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale3); in timeGetDateTimeInstance_multiple() 50 DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale4); in timeGetDateTimeInstance_multiple()
|
D | ExpensiveObjectsBenchmark.java | 20 import java.text.DateFormat; 34 DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT); in timeNewDateFormatTimeInstance() 40 DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT); in timeClonedDateFormatTimeInstance() 42 ((DateFormat) df.clone()).format(System.currentTimeMillis()); in timeClonedDateFormatTimeInstance() 47 DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT); in timeReusedDateFormatTimeInstance()
|
/libcore/ojluni/annotations/hiddenapi/java/text/ |
D | DateFormat.java | 45 public abstract class DateFormat extends java.text.Format { class 47 protected DateFormat() { in DateFormat() method in DateFormat 77 public static final java.text.DateFormat getTimeInstance() { in getTimeInstance() 81 public static final java.text.DateFormat getTimeInstance(int style) { in getTimeInstance() 85 public static final java.text.DateFormat getTimeInstance(int style, java.util.Locale aLocale) { in getTimeInstance() 89 public static final java.text.DateFormat getDateInstance() { in getDateInstance() 93 public static final java.text.DateFormat getDateInstance(int style) { in getDateInstance() 97 public static final java.text.DateFormat getDateInstance(int style, java.util.Locale aLocale) { in getDateInstance() 101 public static final java.text.DateFormat getDateTimeInstance() { in getDateTimeInstance() 105 public static final java.text.DateFormat getDateTimeInstance(int dateStyle, int timeStyle) { in getDateTimeInstance() [all …]
|
/libcore/ojluni/annotations/mmodule/java/text/ |
D | DateFormat.annotated.java | 50 public abstract class DateFormat extends java.text.Format { class 52 protected DateFormat() { throw new RuntimeException("Stub!"); } in DateFormat() method in DateFormat 66 public static final java.text.DateFormat getTimeInstance() { throw new RuntimeException("Stub!"); } in getTimeInstance() 68 public static final java.text.DateFormat getTimeInstance(int style) { throw new RuntimeException("S… in getTimeInstance() 70 public static final java.text.DateFormat getTimeInstance(int style, java.util.Locale aLocale) { thr… in getTimeInstance() 72 public static final java.text.DateFormat getDateInstance() { throw new RuntimeException("Stub!"); } in getDateInstance() 74 public static final java.text.DateFormat getDateInstance(int style) { throw new RuntimeException("S… in getDateInstance() 76 public static final java.text.DateFormat getDateInstance(int style, java.util.Locale aLocale) { thr… in getDateInstance() 78 public static final java.text.DateFormat getDateTimeInstance() { throw new RuntimeException("Stub!"… in getDateTimeInstance() 80 public static final java.text.DateFormat getDateTimeInstance(int dateStyle, int timeStyle) { throw … in getDateTimeInstance() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKLocalizedPrinterParser.java | 66 import java.text.DateFormat; 93 originalIs24Hour = DateFormat.is24Hour; in clearIs24Hour() 94 DateFormat.set24HourTimePref(null); in clearIs24Hour() 99 DateFormat.set24HourTimePref(originalIs24Hour); in resetIs24Hour() 122 {LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.UK}, in data_date() 123 {LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.US}, in data_date() 124 {LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.FRANCE}, in data_date() 125 {LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.JAPAN}, in data_date() 127 {LocalDate.of(2012, 6, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.UK}, in data_date() 128 {LocalDate.of(2012, 6, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.US}, in data_date() [all …]
|
/libcore/luni/src/test/java/libcore/libcore/icu/ |
D | SimpleDateFormatDataTest.java | 24 import java.text.DateFormat; 44 Boolean originalSetting = DateFormat.is24Hour; in testTimeFormat12And24() 47 DateFormat.is24Hour = false; in testTimeFormat12And24() 48 assertEquals("h:mm" + sep + "a", en_US.getTimeFormat(DateFormat.SHORT)); in testTimeFormat12And24() 49 DateFormat.is24Hour = true; in testTimeFormat12And24() 50 assertEquals("HH:mm", en_US.getTimeFormat(DateFormat.SHORT)); in testTimeFormat12And24() 53 DateFormat.is24Hour = false; in testTimeFormat12And24() 54 assertEquals("aK:mm", ja_JP.getTimeFormat(DateFormat.SHORT)); in testTimeFormat12And24() 55 DateFormat.is24Hour = true; in testTimeFormat12And24() 56 assertEquals("H:mm", ja_JP.getTimeFormat(DateFormat.SHORT)); in testTimeFormat12And24() [all …]
|
/libcore/ojluni/annotations/sdk/nullability/java/text/ |
D | DateFormat.annotated.java | 50 public abstract class DateFormat extends java.text.Format { class 52 protected DateFormat() { throw new RuntimeException("Stub!"); } in DateFormat() method in DateFormat 66 @libcore.util.NonNull public static final java.text.DateFormat getTimeInstance() { throw new Runtim… in getTimeInstance() 68 @libcore.util.NonNull public static final java.text.DateFormat getTimeInstance(int style) { throw n… in getTimeInstance() 70 @libcore.util.NonNull public static final java.text.DateFormat getTimeInstance(int style, @libcore.… in getTimeInstance() 72 @libcore.util.NonNull public static final java.text.DateFormat getDateInstance() { throw new Runtim… in getDateInstance() 74 @libcore.util.NonNull public static final java.text.DateFormat getDateInstance(int style) { throw n… in getDateInstance() 76 @libcore.util.NonNull public static final java.text.DateFormat getDateInstance(int style, @libcore.… in getDateInstance() 78 @libcore.util.NonNull public static final java.text.DateFormat getDateTimeInstance() { throw new Ru… in getDateTimeInstance() 80 @libcore.util.NonNull public static final java.text.DateFormat getDateTimeInstance(int dateStyle, i… in getDateTimeInstance() [all …]
|
/libcore/luni/src/test/java/libcore/highmemorytest/libcore/icu/ |
D | SimpleDateFormatDataTest.java | 21 import java.text.DateFormat; 45 assertNotEquals(0, d.getDateFormat(DateFormat.FULL).length()); in testLongDateTimeFormat() 46 assertNotEquals(0, d.getDateFormat(DateFormat.LONG).length()); in testLongDateTimeFormat() 47 assertNotEquals(0, d.getDateFormat(DateFormat.MEDIUM).length()); in testLongDateTimeFormat() 48 assertNotEquals(0, d.getDateFormat(DateFormat.SHORT).length()); in testLongDateTimeFormat() 50 assertNotEquals(0, d.getTimeFormat(DateFormat.FULL).length()); in testLongDateTimeFormat() 51 assertNotEquals(0, d.getTimeFormat(DateFormat.LONG).length()); in testLongDateTimeFormat() 52 assertNotEquals(0, d.getTimeFormat(DateFormat.MEDIUM).length()); in testLongDateTimeFormat() 53 assertNotEquals(0, d.getTimeFormat(DateFormat.SHORT).length()); in testLongDateTimeFormat()
|
/libcore/luni/src/test/java/libcore/highmemorytest/java/text/ |
D | DateFormatTest.java | 26 import java.text.DateFormat; 58 for (int formatStyle = DateFormat.FULL; formatStyle <= DateFormat.SHORT; in test_format_allLocales() 61 assertNonEmpty(DateFormat.getDateInstance(formatStyle, locale).format(TEST_DATE)); in test_format_allLocales() 62 assertNonEmpty(DateFormat.getTimeInstance(formatStyle, locale).format(TEST_DATE)); in test_format_allLocales() 63 assertNonEmpty(DateFormat.getDateTimeInstance(formatStyle, formatStyle, locale) in test_format_allLocales() 77 for (int formatStyle = DateFormat.FULL; formatStyle <= DateFormat.SHORT; in test_toPattern_allLocales() 80 assertSupportedSymbols(DateFormat.getDateInstance(formatStyle, locale), locale); in test_toPattern_allLocales() 81 assertSupportedSymbols(DateFormat.getTimeInstance(formatStyle, locale), locale); in test_toPattern_allLocales() 82 assertSupportedSymbols(DateFormat.getDateTimeInstance( in test_toPattern_allLocales() 95 private static void assertSupportedSymbols(DateFormat dateFormat, Locale locale) { in assertSupportedSymbols()
|
/libcore/ojluni/src/main/java/java/text/ |
D | DateFormat.java | 176 public abstract class DateFormat extends Format { class 499 public static final DateFormat getTimeInstance() in getTimeInstance() 516 public static final DateFormat getTimeInstance(int style) in getTimeInstance() 529 public static final DateFormat getTimeInstance(int style, in getTimeInstance() 545 public static final DateFormat getDateInstance() in getDateInstance() 562 public static final DateFormat getDateInstance(int style) in getDateInstance() 575 public static final DateFormat getDateInstance(int style, in getDateInstance() 591 public static final DateFormat getDateTimeInstance() in getDateTimeInstance() 610 public static final DateFormat getDateTimeInstance(int dateStyle, in getDateTimeInstance() 624 public static final DateFormat [all …]
|
D | MessageFormat.java | 564 } else if (fmt instanceof DateFormat) { in toPattern() 567 DateFormat df = DateFormat.getDateInstance(DATE_TIME_MODIFIERS[index], in toPattern() 573 df = DateFormat.getTimeInstance(DATE_TIME_MODIFIERS[index], in toPattern() 1299 subFormatter = DateFormat.getDateTimeInstance( in subformat() 1300 DateFormat.SHORT, DateFormat.SHORT, locale);//fix in subformat() 1433 DateFormat.DEFAULT, 1434 DateFormat.SHORT, 1435 DateFormat.MEDIUM, 1436 DateFormat.LONG, 1437 DateFormat.FULL, [all …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_MessageFormat.java | 20 import java.text.DateFormat; 61 t_FormatWithField(2, format, objects, null, DateFormat.Field.AM_PM, 0, in t_format_with_FieldPosition() 67 t_FormatWithField(4, format, objects, null, DateFormat.Field.ERA, 0, 0); in t_format_with_FieldPosition() 88 v.add(new FieldContainer(3, 6, DateFormat.Field.MONTH)); in getMessageVector1() 91 v.add(new FieldContainer(7, 9, DateFormat.Field.DAY_OF_MONTH)); in getMessageVector1() 94 v.add(new FieldContainer(11, 15, DateFormat.Field.YEAR)); in getMessageVector1() 96 v.add(new FieldContainer(19, 20, DateFormat.Field.HOUR1)); in getMessageVector1() 99 v.add(new FieldContainer(21, 23, DateFormat.Field.MINUTE)); in getMessageVector1() 102 v.add(new FieldContainer(24, 26, DateFormat.Field.SECOND)); in getMessageVector1() 105 v.add(new FieldContainer(27, 29, DateFormat.Field.AM_PM)); in getMessageVector1()
|
/libcore/luni/src/main/java/libcore/net/http/ |
D | HttpDate.java | 20 import java.text.DateFormat; 36 private static final ThreadLocal<DateFormat> STANDARD_DATE_FORMAT 37 = new ThreadLocal<DateFormat>() { 38 @Override protected DateFormat initialValue() { 39 DateFormat rfc1123 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
|