/libcore/luni/src/test/java/libcore/java/util/ |
D | CalendarWeekOfMonthTest.java | 19 import java.util.Calendar; 50 { 1462107600000L, "01 May 2016", Calendar.MONDAY, 4, 0 }, in data() 51 { 1462194000000L, "02 May 2016", Calendar.MONDAY, 4, 1 }, in data() 52 { 1462798800000L, "09 May 2016", Calendar.MONDAY, 4, 2 }, in data() 53 { 1463403600000L, "16 May 2016", Calendar.MONDAY, 4, 3 }, in data() 54 { 1464008400000L, "23 May 2016", Calendar.MONDAY, 4, 4 }, in data() 55 { 1464613200000L, "30 May 2016", Calendar.MONDAY, 4, 5 }, in data() 56 { 1464786000000L, "01 Jun 2016", Calendar.MONDAY, 4, 1 }, in data() 57 { 1465218000000L, "06 Jun 2016", Calendar.MONDAY, 4, 2 }, in data() 58 { 1465822800000L, "13 Jun 2016", Calendar.MONDAY, 4, 3 }, in data() [all …]
|
D | CalendarBuilderTest.java | 20 import java.util.Calendar; 37 Calendar.Builder builder = new Calendar.Builder(); in test_default_values() 45 Calendar.Builder builder = new Calendar.Builder(); in test_setCalendarType_iso8601() 51 expected.setFirstDayOfWeek(Calendar.MONDAY); in test_setCalendarType_iso8601() 58 Calendar.Builder builder = new Calendar.Builder(); in test_setCalendarType_invalid() 75 Calendar.Builder builder = new Calendar.Builder(); in test_setCalendarType_reset() 85 Calendar.Builder builder = new Calendar.Builder(); in test_setDate() 86 builder.setDate(2000, Calendar.FEBRUARY, 3); in test_setDate() 89 expected.set(2000, Calendar.FEBRUARY, 3); in test_setDate() 95 Calendar.Builder builder = new Calendar.Builder(); in test_setTimeOfDay() [all …]
|
D | GregorianCalendarTest.java | 23 import java.util.Calendar; 41 Calendar.MARCH, 9, 0, hours(2), 42 Calendar.NOVEMBER, 2, 0, hours(2), 66 Calendar greg = new GregorianCalendar(LOS_ANGELES, Locale.ENGLISH); in test_computeFields_dayOfWeekAndWeekOfYearSet() 69 int differentWeekOfYear = greg.get(Calendar.WEEK_OF_YEAR) == 1 ? 2 : 1; in test_computeFields_dayOfWeekAndWeekOfYearSet() 70 int differentDayOfWeek = greg.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY in test_computeFields_dayOfWeekAndWeekOfYearSet() 71 ? Calendar.TUESDAY : Calendar.MONDAY; in test_computeFields_dayOfWeekAndWeekOfYearSet() 75 greg.set(Calendar.WEEK_OF_YEAR, differentWeekOfYear); in test_computeFields_dayOfWeekAndWeekOfYearSet() 76 assertEquals(differentWeekOfYear, greg.get(Calendar.WEEK_OF_YEAR)); in test_computeFields_dayOfWeekAndWeekOfYearSet() 77 greg.set(Calendar.DAY_OF_WEEK, differentDayOfWeek); in test_computeFields_dayOfWeekAndWeekOfYearSet() [all …]
|
D | SimpleTimeZoneTest.java | 22 import java.util.Calendar; 57 Calendar.MARCH, -1, Calendar.SUNDAY, 3600000, SimpleTimeZone.UTC_TIME, in testDstParis2014_LastSundayMarch_LastSundayOctober_UtcTime() 58 Calendar.OCTOBER, -1, Calendar.SUNDAY, 3600000, SimpleTimeZone.UTC_TIME, 3600000); in testDstParis2014_LastSundayMarch_LastSundayOctober_UtcTime() 65 Calendar.MARCH, 25, -Calendar.SUNDAY, 3600000, SimpleTimeZone.UTC_TIME, in testDstParis2014_SundayAfter25thMarch_SundayAfter25thOctober_UtcTime() 66 Calendar.OCTOBER, 25, -Calendar.SUNDAY, 3600000, SimpleTimeZone.UTC_TIME, 3600000); in testDstParis2014_SundayAfter25thMarch_SundayAfter25thOctober_UtcTime() 73 Calendar.MARCH, 30, 0, 3600000, SimpleTimeZone.UTC_TIME, in testDstParis2014_30thMarch_26thOctober_UtcTime() 74 Calendar.OCTOBER, 26, 0, 3600000, SimpleTimeZone.UTC_TIME, 3600000); in testDstParis2014_30thMarch_26thOctober_UtcTime() 91 Calendar.APRIL, 1, -Calendar.SUNDAY, 7200000, in testDst_1stSundayApril_1stSundayOctober_DefaultTime() 92 Calendar.OCTOBER, -1, Calendar.SUNDAY, 7200000, in testDst_1stSundayApril_1stSundayOctober_DefaultTime() 116 Calendar.MARCH, 2, Calendar.SUNDAY, 7200000, SimpleTimeZone.STANDARD_TIME, in testDstNewYork2014_2ndSundayMarch_1stSundayNovember_StandardTime() [all …]
|
D | CalendarTest.java | 20 import java.util.Calendar; 49 Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.US); in test_setTimeZone() 50 assertEquals(0, cal.get(Calendar.ZONE_OFFSET)); in test_setTimeZone() 53 assertEquals(25200000, cal.get(Calendar.ZONE_OFFSET)); in test_setTimeZone() 57 Calendar calendar = new GregorianCalendar(AMERICA_SAO_PAULO); in testAddOneDayOverDstForwardAdds23HoursAt0100() 60 calendar.add(Calendar.DATE, 1); in testAddOneDayOverDstForwardAdds23HoursAt0100() 73 Calendar calendar = new GregorianCalendar(AMERICA_SAO_PAULO); in testAddOneDayOverDstForwardAdds24HoursAt0000() 76 calendar.add(Calendar.DATE, 1); in testAddOneDayOverDstForwardAdds24HoursAt0000() 82 Calendar calendar = new GregorianCalendar(AMERICA_SAO_PAULO); in testAddOneDayOverDstBackAdds25HoursAt0000() 85 calendar.add(Calendar.DATE, 1); in testAddOneDayOverDstBackAdds25HoursAt0000() [all …]
|
D | OldGregorianCalendarTest.java | 20 import java.util.Calendar; 38 assertTrue(gc2.get(Calendar.HOUR) == ((gc1.get(Calendar.HOUR) + 1) % 12)); in testGetHour() 60 assertEquals(1, g.get(Calendar.ERA)); in test_computeFields() 61 assertEquals(2008, g.get(Calendar.YEAR)); in test_computeFields() 62 assertEquals(Calendar.SEPTEMBER, g.get(Calendar.MONTH)); in test_computeFields() 63 assertEquals(23, g.get(Calendar.DAY_OF_MONTH)); in test_computeFields() 64 assertEquals(17, g.get(Calendar.HOUR_OF_DAY)); in test_computeFields() 65 assertEquals(0, g.get(Calendar.MINUTE)); in test_computeFields() 78 g1.set(2008, Calendar.SEPTEMBER, 23, 18, 0, 0); in test_hashCode()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | CalendarTest.java | 22 import java.util.Calendar; 41 Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("EST")); in test_setII() 44 cal.set(Calendar.YEAR, 2002); in test_setII() 49 cal.set(Calendar.YEAR, 2002); in test_setII() 50 cal.set(Calendar.MONTH, Calendar.MARCH); in test_setII() 55 cal.set(Calendar.YEAR, 2002); in test_setII() 56 cal.set(Calendar.DATE, 24); in test_setII() 60 cal.set(Calendar.MONTH, Calendar.OCTOBER); in test_setII() 61 cal.set(Calendar.DATE, 31); in test_setII() 62 cal.set(Calendar.MONTH, Calendar.NOVEMBER); in test_setII() [all …]
|
D | GregorianCalendarTest.java | 21 import java.util.Calendar; 64 GregorianCalendar gc = new GregorianCalendar(1972, Calendar.OCTOBER, 13); in test_ConstructorIII() 66 1972, gc.get(Calendar.YEAR)); in test_ConstructorIII() 68 gc.get(Calendar.MONTH) == Calendar.OCTOBER); in test_ConstructorIII() 70 .get(Calendar.DAY_OF_MONTH)); in test_ConstructorIII() 81 GregorianCalendar gc = new GregorianCalendar(1972, Calendar.OCTOBER, in test_ConstructorIIIII() 84 1972, gc.get(Calendar.YEAR)); in test_ConstructorIIIII() 86 gc.get(Calendar.MONTH) == Calendar.OCTOBER); in test_ConstructorIIIII() 88 .get(Calendar.DAY_OF_MONTH)); in test_ConstructorIIIII() 89 assertEquals("Incorrect calendar constructed", 7, gc.get(Calendar.HOUR)); in test_ConstructorIIIII() [all …]
|
D | SimpleTimeZoneTest.java | 20 import java.util.Calendar; 53 SimpleTimeZone st = new SimpleTimeZone(1000, "TEST", Calendar.NOVEMBER, in test_ConstructorILjava_lang_StringIIIIIIII() 54 1, Calendar.SUNDAY, 0, Calendar.NOVEMBER, -1, Calendar.SUNDAY, in test_ConstructorILjava_lang_StringIIIIIIII() 57 .inDaylightTime(new GregorianCalendar(1998, Calendar.NOVEMBER, in test_ConstructorILjava_lang_StringIIIIIIII() 60 .inDaylightTime(new GregorianCalendar(1998, Calendar.OCTOBER, in test_ConstructorILjava_lang_StringIIIIIIII() 68 1, Calendar.SUNDAY, 0, Calendar.NOVEMBER, -1, Calendar.SUNDAY, in test_ConstructorILjava_lang_StringIIIIIIII() 76 new SimpleTimeZone(1000, "TEST", Calendar.NOVEMBER, in test_ConstructorILjava_lang_StringIIIIIIII() 77 10, Calendar.SUNDAY, 0, Calendar.NOVEMBER, -1, Calendar.SUNDAY, in test_ConstructorILjava_lang_StringIIIIIIII() 85 new SimpleTimeZone(1000, "TEST", Calendar.NOVEMBER, in test_ConstructorILjava_lang_StringIIIIIIII() 86 1, 10, 0, Calendar.NOVEMBER, -1, Calendar.SUNDAY, in test_ConstructorILjava_lang_StringIIIIIIII() [all …]
|
D | DateTest.java | 23 import java.util.Calendar; 36 GregorianCalendar gc = new GregorianCalendar(1998, Calendar.OCTOBER, in test_Constructor() 57 Calendar cal = new GregorianCalendar(1999, Calendar.JUNE, 22); in test_ConstructorIII() 205 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getDate() 215 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getDay() 225 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getHours() 235 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getMinutes() 245 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getMonth() 255 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getSeconds() 284 Date d = new GregorianCalendar(1998, Calendar.OCTOBER, 13, 19, 9) in test_getYear() [all …]
|
/libcore/luni/src/test/java/libcore/java/sql/ |
D | OldResultSetGetterTests.java | 32 import java.util.Calendar; 411 GregorianCalendar testCal = new GregorianCalendar(1799, Calendar.MAY, 26, 0, 0); in testGetDateInt() 431 GregorianCalendar testCal = new GregorianCalendar(1799, Calendar.MAY, 26, 0, 0); in testGetDateIntCalendar() 453 GregorianCalendar testCal = new GregorianCalendar(1799, Calendar.MAY, 26, 0, 0); in testGetDateString() 473 GregorianCalendar testCal = new GregorianCalendar(1799, Calendar.MAY, 26, 0, 0); in testGetDateStringCalendar() 926 Calendar cal = new GregorianCalendar(); in testGetTimeInt() 928 cal.set(Calendar.HOUR_OF_DAY, 12); in testGetTimeInt() 929 cal.set(Calendar.MINUTE, 35); in testGetTimeInt() 930 cal.set(Calendar.SECOND, 45); in testGetTimeInt() 931 cal.set(Calendar.MILLISECOND, 0); in testGetTimeInt() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | DataFormatFieldTest.java | 29 import java.util.Calendar; 37 MyField field = new MyField("day of month", Calendar.ERA); in test_ConstructorLjava_lang_StringLjava_lang_String() 40 assertEquals("field has wrong Calendar field number", Calendar.ERA, in test_ConstructorLjava_lang_StringLjava_lang_String() 44 .ofCalendarField(Calendar.ERA); in test_ConstructorLjava_lang_StringLjava_lang_String() 49 .ofCalendarField(Calendar.DAY_OF_MONTH); in test_ConstructorLjava_lang_StringLjava_lang_String() 70 MyField field = new MyField("a field", Calendar.DAY_OF_WEEK); in test_ConstructorLjava_lang_StringI() 74 Calendar.DAY_OF_WEEK, field.getCalendarField()); in test_ConstructorLjava_lang_StringI() 77 .ofCalendarField(Calendar.DAY_OF_WEEK); in test_ConstructorLjava_lang_StringI() 86 MyField field = new MyField("day of month", Calendar.ERA); in test_Constructor2() 89 assertEquals("field has wrong Calendar field number", Calendar.ERA, in test_Constructor2() [all …]
|
D | SimpleDateFormatTest.java | 25 import java.util.Calendar; 257 Calendar cal = new GregorianCalendar(1999, Calendar.JUNE, 2, 15, 3, 6); in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 261 assertFormat(format, " G", new GregorianCalendar(-1999, Calendar.JUNE, 2), " BC", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 268 assertFormat(format, " yy", new GregorianCalendar(2001, Calendar.JUNE, 2), " 01", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 270 assertFormat(format, " yy", new GregorianCalendar(2000, Calendar.JUNE, 2), " 00", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 272 assertFormat(format, " yyy", new GregorianCalendar(2000, Calendar.JUNE, 2), " 2000", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 279 assertFormat(format, " M", new GregorianCalendar(1999, Calendar.NOVEMBER, 2), " 11", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 287 assertFormat(format, " d", new GregorianCalendar(1999, Calendar.NOVEMBER, 12), " 12", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 293 assertFormat(format, " h", new GregorianCalendar(1999, Calendar.NOVEMBER, 12), " 12", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() 299 assertFormat(format, " H", new GregorianCalendar(1999, Calendar.NOVEMBER, 12, 4, 0), " 4", in test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestThaiBuddhistChronoImpl.java | 66 import java.util.Calendar; 97 Calendar cal = java.util.Calendar.getInstance(locale); in test_ThaiBuddhistChrono_vsCalendar() 103 cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR)); in test_ThaiBuddhistChrono_vsCalendar() 104 cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1); in test_ThaiBuddhistChrono_vsCalendar() 105 cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH)); in test_ThaiBuddhistChrono_vsCalendar() 108 …assertEquals(thaiDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch… in test_ThaiBuddhistChrono_vsCalendar() 109 …assertEquals(thaiDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch… in test_ThaiBuddhistChrono_vsCalendar() 110 …assertEquals(thaiDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + … in test_ThaiBuddhistChrono_vsCalendar() 113 cal.add(Calendar.DAY_OF_MONTH, 1); in test_ThaiBuddhistChrono_vsCalendar() 117 private String calToString(Calendar cal) { in calToString() [all …]
|
D | TestIsoChronoImpl.java | 72 import java.util.Calendar; 103 cal.set(Calendar.YEAR, isoDate.get(YEAR)); in test_IsoChrono_vsCalendar() 104 cal.set(Calendar.MONTH, isoDate.get(MONTH_OF_YEAR) - 1); in test_IsoChrono_vsCalendar() 105 cal.set(Calendar.DAY_OF_MONTH, isoDate.get(DAY_OF_MONTH)); in test_IsoChrono_vsCalendar() 108 …assertEquals(isoDate.get(DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + isoDa… in test_IsoChrono_vsCalendar() 109 …assertEquals(isoDate.get(MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + isoDa… in test_IsoChrono_vsCalendar() 110 … assertEquals(isoDate.get(YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + isoDate); in test_IsoChrono_vsCalendar() 113 cal.add(Calendar.DAY_OF_MONTH, 1); in test_IsoChrono_vsCalendar() 134 cal.set(Calendar.YEAR, isoDate.get(YEAR)); in test_DayOfWeek_IsoChronology_vsCalendar() 135 cal.set(Calendar.MONTH, isoDate.get(MONTH_OF_YEAR) - 1); in test_DayOfWeek_IsoChronology_vsCalendar() [all …]
|
D | TestJapaneseChronoImpl.java | 72 import java.util.Calendar; 105 Calendar cal = Calendar.getJapaneseImperialInstance(TimeZone.getDefault(), locale); in test_JapaneseChrono_vsCalendar() 117 …assertEquals(jDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in… in test_JapaneseChrono_vsCalendar() 118 …assertEquals(jDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in… in test_JapaneseChrono_vsCalendar() 119 …assertEquals(jDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + jDa… in test_JapaneseChrono_vsCalendar() 122 cal.add(Calendar.DAY_OF_MONTH, 1); in test_JapaneseChrono_vsCalendar() 133 Calendar cal = java.util.Calendar.getInstance(locale); in test_dayOfYearVsCalendar() 143 assertEquals(jd.get(ChronoField.DAY_OF_YEAR), cal.get(Calendar.DAY_OF_YEAR), in test_dayOfYearVsCalendar() 145 …tEquals(jd.range(ChronoField.DAY_OF_YEAR).getMaximum(), cal.getActualMaximum(Calendar.DAY_OF_YEAR), in test_dayOfYearVsCalendar() 147 …tEquals(jd.range(ChronoField.DAY_OF_YEAR).getMinimum(), cal.getActualMinimum(Calendar.DAY_OF_YEAR), in test_dayOfYearVsCalendar()
|
/libcore/ojluni/src/main/java/sun/util/locale/provider/ |
D | CalendarDataUtility.java | 31 import static java.util.Calendar.*; 35 import java.util.Calendar; 143 if (field == Calendar.ERA) { in retrieveFieldValueName() 300 if (field == Calendar.ERA) { in retrieveFieldValueNamesImpl() 336 case Calendar.MONTH: in getNames() 338 case Calendar.ERA: in getNames() 349 case Calendar.DAY_OF_WEEK: in getNames() 351 case Calendar.AM_PM: in getNames() 370 case Calendar.SHORT_FORMAT: in toWidth() 371 case Calendar.SHORT_STANDALONE: in toWidth() [all …]
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | TextStyle.java | 64 import java.util.Calendar; 96 FULL(Calendar.LONG_FORMAT, 0), 101 FULL_STANDALONE(Calendar.LONG_STANDALONE, 0), 106 SHORT(Calendar.SHORT_FORMAT, 1), 111 SHORT_STANDALONE(Calendar.SHORT_STANDALONE, 1), 116 NARROW(Calendar.NARROW_FORMAT, 1), 121 NARROW_STANDALONE(Calendar.NARROW_STANDALONE, 1);
|
D | DateTimeTextProvider.java | 82 import java.util.Calendar; 178 fieldIndex = Calendar.ERA; in getText() 189 fieldIndex = Calendar.MONTH; in getText() 192 fieldIndex = Calendar.DAY_OF_WEEK; in getText() 195 fieldValue = Calendar.SUNDAY; in getText() 198 fieldIndex = Calendar.AM_PM; in getText() 258 fieldIndex = Calendar.ERA; in getTextIterator() 261 fieldIndex = Calendar.MONTH; in getTextIterator() 264 fieldIndex = Calendar.DAY_OF_WEEK; in getTextIterator() 267 fieldIndex = Calendar.AM_PM; in getTextIterator() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | DateFormat.java | 43 import java.util.Calendar; 188 protected Calendar calendar; 694 public void setCalendar(Calendar newCalendar) in setCalendar() 704 public Calendar getCalendar() in getCalendar() 829 other.calendar = (Calendar) calendar.clone(); in clone() 907 new Field[Calendar.FIELD_COUNT]; 998 public static final Field ERA = new Field("era", Calendar.ERA); 1003 public static final Field YEAR = new Field("year", Calendar.YEAR); 1008 public static final Field MONTH = new Field("month", Calendar.MONTH); 1014 Field("day of month", Calendar.DAY_OF_MONTH); [all …]
|
/libcore/ojluni/annotations/sdk/nullability/java/util/ |
D | Calendar.annotated.java | 48 public abstract class Calendar implements java.io.Serializable, java.lang.Cloneable, java.lang.Comp… class 50 protected Calendar() { throw new RuntimeException("Stub!"); } in Calendar() method in Calendar 52 protected Calendar(@libcore.util.NonNull java.util.TimeZone zone, @libcore.util.NonNull java.util.L… in Calendar() method in Calendar 54 @libcore.util.NonNull public static java.util.Calendar getInstance() { throw new RuntimeException("… in getInstance() 56 @libcore.util.NonNull public static java.util.Calendar getInstance(@libcore.util.NonNull java.util.… in getInstance() 58 @libcore.util.NonNull public static java.util.Calendar getInstance(@libcore.util.NonNull java.util.… in getInstance() 60 @libcore.util.NonNull public static java.util.Calendar getInstance(@libcore.util.NonNull java.util.… in getInstance() 112 public int compareTo(@libcore.util.NonNull java.util.Calendar anotherCalendar) { throw new RuntimeE… in compareTo() 277 @libcore.util.NonNull public java.util.Calendar.Builder setInstant(long instant) { throw new Runtim… in setInstant() 279 @libcore.util.NonNull public java.util.Calendar.Builder setInstant(@libcore.util.NonNull java.util.… in setInstant() [all …]
|
/libcore/ojluni/src/test/java/util/GregorianCalendar/ |
D | GregorianCalendarTest.java | 63 if (!((y = gc.get(java.util.Calendar.YEAR)) == (date.getYear()+1900) && in testGregorianCalendar() 64 gc.get(java.util.Calendar.MONTH) == date.getMonth() && in testGregorianCalendar() 65 gc.get(java.util.Calendar.DAY_OF_MONTH) == date.getDate() && in testGregorianCalendar() 66 gc.get(java.util.Calendar.HOUR_OF_DAY) == date.getHours() && in testGregorianCalendar() 67 gc.get(java.util.Calendar.MINUTE) == date.getMinutes() && in testGregorianCalendar() 68 gc.get(java.util.Calendar.SECOND) == date.getSeconds())) { in testGregorianCalendar() 102 checkTimes(gc, year, java.util.Calendar.JANUARY, in testGregorianCalendar() 113 delta = getDelta(gc.get(java.util.Calendar.YEAR)); in testGregorianCalendar() 118 checkTimes(gc, 1900, java.util.Calendar.JANUARY, dayOfMonth, in testGregorianCalendar() 121 delta = getDelta(gc.get(java.util.Calendar.YEAR)); in testGregorianCalendar() [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/util/ |
D | Calendar.java | 45 public abstract class Calendar class 48 java.lang.Comparable<java.util.Calendar> { 50 protected Calendar() { in Calendar() method in Calendar 54 protected Calendar(java.util.TimeZone zone, java.util.Locale aLocale) { in Calendar() method in Calendar 58 public static java.util.Calendar getInstance() { in getInstance() 62 public static java.util.Calendar getInstance(java.util.TimeZone zone) { in getInstance() 66 public static java.util.Calendar getInstance(java.util.Locale aLocale) { in getInstance() 70 public static java.util.Calendar getInstance( in getInstance() 75 public static java.util.Calendar getJapaneseImperialInstance( in getJapaneseImperialInstance() 80 private static java.util.Calendar createCalendar( in createCalendar() [all …]
|
/libcore/ojluni/src/test/java/util/TimeZone/ |
D | SimpleTimeZoneCloneRaceTest.java | 27 import java.util.Calendar; 91 Calendar.APRIL, 1, -Calendar.SUNDAY, in createSTZ() 93 Calendar.OCTOBER, -1, Calendar.SUNDAY, in createSTZ() 105 Calendar cal = Calendar.getInstance(tz, Locale.ROOT); 106 cal.set(2000, Calendar.MAY, 1, 0, 0, 0);
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 26 import java.util.Calendar; 116 … assertEquals(Calendar.JUNE, parseDateUtc(en, "yyyy-MMMM-dd", "1980-June-12").get(Calendar.MONTH)); in testStandAloneNames() 117 … assertEquals(Calendar.JUNE, parseDateUtc(en, "yyyy-LLLL-dd", "1980-June-12").get(Calendar.MONTH)); in testStandAloneNames() 118 …assertEquals(Calendar.JUNE, parseDateUtc(pl, "yyyy-MMMM-dd", "1980-czerwca-12").get(Calendar.MONTH… in testStandAloneNames() 119 …assertEquals(Calendar.JUNE, parseDateUtc(pl, "yyyy-LLLL-dd", "1980-czerwiec-12").get(Calendar.MONT… in testStandAloneNames() 121 … assertEquals(Calendar.TUESDAY, parseDateUtc(en, "EEEE", "Tuesday").get(Calendar.DAY_OF_WEEK)); in testStandAloneNames() 122 … assertEquals(Calendar.TUESDAY, parseDateUtc(en, "cccc", "Tuesday").get(Calendar.DAY_OF_WEEK)); in testStandAloneNames() 123 …assertEquals(Calendar.TUESDAY, parseDateUtc(ru, "EEEE", "\u0432\u0442\u043e\u0440\u043d\u0438\u043… in testStandAloneNames() 124 …assertEquals(Calendar.TUESDAY, parseDateUtc(ru, "cccc", "\u0412\u0442\u043e\u0440\u043d\u0438\u043… in testStandAloneNames() 250 private static Calendar parseDateUtc(Locale l, String fmt, String value) { in parseDateUtc() [all …]
|