/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | DateFormatTest.java | 19 import java.text.DateFormat; 34 DateFormat format = DateFormat.getInstance(); in test_clone() 35 DateFormat clone = (DateFormat) format.clone(); in test_clone() 45 Locale[] locales = DateFormat.getAvailableLocales(); in test_getAvailableLocales() 53 DateFormat f1 = DateFormat.getDateTimeInstance(DateFormat.SHORT, in test_getAvailableLocales() 54 DateFormat.SHORT, locales[i]); in test_getAvailableLocales() 65 DateFormat format = DateFormat.getInstance(); in test_getCalendar() 75 SimpleDateFormat f2 = (SimpleDateFormat) DateFormat.getDateInstance(); in test_getDateInstance() 77 assertTrue("Wrong default", f2.equals(DateFormat.getDateInstance( in test_getDateInstance() 78 DateFormat.DEFAULT, Locale.getDefault()))); in test_getDateInstance() [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 | ParseExceptionTest.java | 19 import java.text.DateFormat; 30 DateFormat df = DateFormat.getInstance(); in test_ConstructorLjava_lang_StringI() 43 DateFormat df = DateFormat.getInstance(); in test_getErrorOffset()
|
D | Support_MessageFormat.java | 20 import java.text.DateFormat; 48 DateFormat.is24Hour = null; in t_format_with_FieldPosition() 64 t_FormatWithField(2, format, objects, null, DateFormat.Field.AM_PM, 0, in t_format_with_FieldPosition() 70 t_FormatWithField(4, format, objects, null, DateFormat.Field.ERA, 0, 0); in t_format_with_FieldPosition() 77 DateFormat.is24Hour = null; in t_formatToCharacterIterator() 91 v.add(new FieldContainer(3, 6, DateFormat.Field.MONTH)); in getMessageVector1() 94 v.add(new FieldContainer(7, 9, DateFormat.Field.DAY_OF_MONTH)); in getMessageVector1() 97 v.add(new FieldContainer(11, 15, DateFormat.Field.YEAR)); in getMessageVector1() 99 v.add(new FieldContainer(19, 20, DateFormat.Field.HOUR1)); in getMessageVector1() 102 v.add(new FieldContainer(21, 23, DateFormat.Field.MINUTE)); in getMessageVector1() [all …]
|
D | Support_SimpleDateFormat.java | 20 import java.text.DateFormat; 23 import java.text.DateFormat.Field; 54 …SimpleDateFormat format = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.DEFAULT, Locale… in t_format_with_FieldPosition() 138 …SimpleDateFormat format = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.DEFAULT, Locale… in t_formatToCharacterIterator()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | OldDateFormatTest.java | 19 import java.text.DateFormat; 31 private class MockDateFormat extends DateFormat { 71 DateFormat format = DateFormat.getInstance(); in test_equalsLjava_lang_Object() 72 DateFormat clone = (DateFormat) format.clone(); in test_equalsLjava_lang_Object() 75 .equals(DateFormat.getTimeInstance())); in test_equalsLjava_lang_Object() 90 DateFormat.is24Hour = null; in test_formatLjava_util_Date() 91 DateFormat format = DateFormat.getDateTimeInstance( in test_formatLjava_util_Date() 92 DateFormat.SHORT, DateFormat.SHORT, Locale.US); in test_formatLjava_util_Date() 110 DateFormat.is24Hour = null; in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 111 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()
|
D | SimpleDateFormatTest.java | 19 import java.text.DateFormat; 206 DateFormat dateFormat = new SimpleDateFormat(fmt, l); in formatDate() 393 SimpleDateFormat.getDateInstance(DateFormat.SHORT, null); in test_nullLocales() 398 SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, null); in test_nullLocales() 403 SimpleDateFormat.getTimeInstance(DateFormat.SHORT, null); in test_nullLocales() 410 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, new Locale("sl")); in test_sl_dates()
|
/libcore/ojluni/src/main/java/java/text/ |
D | DateFormat.java | 144 public abstract class DateFormat extends Format { class 445 public final static DateFormat getTimeInstance() in getTimeInstance() 457 public final static DateFormat getTimeInstance(int style) in getTimeInstance() 470 public final static DateFormat getTimeInstance(int style, in getTimeInstance() 481 public final static DateFormat getDateInstance() in getDateInstance() 493 public final static DateFormat getDateInstance(int style) in getDateInstance() 506 public final static DateFormat getDateInstance(int style, in getDateInstance() 517 public final static DateFormat getDateTimeInstance() in getDateTimeInstance() 531 public final static DateFormat getDateTimeInstance(int dateStyle, in getDateTimeInstance() 545 public final static DateFormat [all …]
|
D | SimpleDateFormat.java | 407 public class SimpleDateFormat extends DateFormat { 624 dateTimePatterns[DateFormat.SHORT + 4] = localeData.getDateFormat(DateFormat.SHORT); in SimpleDateFormat() 625 dateTimePatterns[DateFormat.MEDIUM + 4] = localeData.getDateFormat(DateFormat.MEDIUM); in SimpleDateFormat() 626 dateTimePatterns[DateFormat.LONG + 4] = localeData.getDateFormat(DateFormat.LONG); in SimpleDateFormat() 627 dateTimePatterns[DateFormat.FULL + 4] = localeData.getDateFormat(DateFormat.FULL); in SimpleDateFormat() 628 dateTimePatterns[DateFormat.SHORT] = localeData.getTimeFormat(DateFormat.SHORT); in SimpleDateFormat() 629 dateTimePatterns[DateFormat.MEDIUM] = localeData.getTimeFormat(DateFormat.MEDIUM); in SimpleDateFormat() 630 dateTimePatterns[DateFormat.LONG] = localeData.getTimeFormat(DateFormat.LONG); in SimpleDateFormat() 631 dateTimePatterns[DateFormat.FULL] = localeData.getTimeFormat(DateFormat.FULL); in SimpleDateFormat() 1043 DateFormat.ERA_FIELD, DateFormat.YEAR_FIELD, DateFormat.MONTH_FIELD, [all …]
|
D | MessageFormat.java | 551 } else if (fmt instanceof DateFormat) { in toPattern() 554 DateFormat df = DateFormat.getDateInstance(DATE_TIME_MODIFIERS[index], in toPattern() 560 df = DateFormat.getTimeInstance(DATE_TIME_MODIFIERS[index], in toPattern() 1269 subFormatter = DateFormat.getDateTimeInstance( in subformat() 1270 DateFormat.SHORT, DateFormat.SHORT, locale);//fix in subformat() 1403 DateFormat.DEFAULT, 1404 DateFormat.SHORT, 1405 DateFormat.MEDIUM, 1406 DateFormat.LONG, 1407 DateFormat.FULL, [all …]
|
/libcore/luni/src/main/java/libcore/icu/ |
D | LocaleData.java | 19 import java.text.DateFormat; 166 case DateFormat.SHORT: in getDateFormat() 168 case DateFormat.MEDIUM: in getDateFormat() 170 case DateFormat.LONG: in getDateFormat() 172 case DateFormat.FULL: in getDateFormat() 180 case DateFormat.SHORT: in getTimeFormat() 181 if (DateFormat.is24Hour == null) { in getTimeFormat() 184 return DateFormat.is24Hour ? timeFormat_Hm : timeFormat_hm; in getTimeFormat() 186 case DateFormat.MEDIUM: in getTimeFormat() 187 if (DateFormat.is24Hour == null) { in getTimeFormat() [all …]
|
D | DateTimeFormat.java | 19 import android.icu.text.DateFormat; 34 static class FormatterCache extends BasicLruCache<String, DateFormat> { 48 DateFormat formatter = CACHED_FORMATTERS.get(key); in format()
|
/libcore/benchmarks/src/benchmarks/regression/ |
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()
|
D | DateToStringBenchmark.java | 19 import android.text.format.DateFormat; 59 DateFormat.format("EEE MMM dd HH:mm:ss zzz yyyy", calendar); in timeDateToString_AndroidDateFormat()
|
/libcore/ojluni/src/main/java/java/text/spi/ |
D | DateFormatProvider.java | 28 import java.text.DateFormat; 66 public abstract DateFormat getTimeInstance(int style, Locale locale); in getTimeInstance() 86 public abstract DateFormat getDateInstance(int style, Locale locale); in getDateInstance() 112 public abstract DateFormat
|
/libcore/luni/src/main/java/libcore/net/http/ |
D | HttpDate.java | 19 import java.text.DateFormat; 35 private static final ThreadLocal<DateFormat> STANDARD_DATE_FORMAT 36 = new ThreadLocal<DateFormat>() { 37 @Override protected DateFormat initialValue() { 38 DateFormat rfc1123 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
|
/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/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | SerializationStressTest4.java | 29 import java.text.DateFormat; 599 objToSave = new java.text.DateFormat() { in test_writeObject_DateFormat() 619 if (!(obj instanceof java.text.DateFormat)) in test_writeObject_DateFormat() 621 return save.equals(((java.text.DateFormat) obj).parse(null, in test_writeObject_DateFormat() 1757 DateFormat.Field[] objToSave = null; in test_writeObject_DateFormat_Field() 1758 DateFormat.Field[] objLoaded = null; in test_writeObject_DateFormat_Field() 1761 objToSave = new DateFormat.Field[] { DateFormat.Field.AM_PM, in test_writeObject_DateFormat_Field() 1762 DateFormat.Field.DAY_OF_MONTH, DateFormat.Field.ERA, in test_writeObject_DateFormat_Field() 1763 DateFormat.Field.HOUR0, DateFormat.Field.HOUR1, in test_writeObject_DateFormat_Field() 1764 DateFormat.Field.HOUR_OF_DAY0, in test_writeObject_DateFormat_Field() [all …]
|
/libcore/ojluni/src/main/java/sun/net/ftp/ |
D | FtpDirEntry.java | 329 … type + "] (" + user + " / " + group + ") {" + size + "} " + java.text.DateFormat.getDateInstance(… in toString()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | DateTest.java | 20 import java.text.DateFormat; 494 DateFormat.is24Hour = null; in test_toLocaleString()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Date.java | 29 import java.text.DateFormat; 1097 DateFormat formatter = DateFormat.getDateTimeInstance(); in toLocaleString()
|