/libcore/luni/src/test/java/libcore/java/util/ |
D | CalendarTest.java | 57 Calendar calendar = new GregorianCalendar(AMERICA_SAO_PAULO); in testAddOneDayOverDstForwardAdds23HoursAt0100() local 58 calendar.set(2011, 9, 15, 1, 0); // 01:00 GMT-3 in testAddOneDayOverDstForwardAdds23HoursAt0100() 59 double hoursSinceEpoch = hoursSinceEpoch(calendar); in testAddOneDayOverDstForwardAdds23HoursAt0100() 60 calendar.add(Calendar.DATE, 1); in testAddOneDayOverDstForwardAdds23HoursAt0100() 61 assertEquals(23.0, hoursSinceEpoch(calendar) - hoursSinceEpoch); in testAddOneDayOverDstForwardAdds23HoursAt0100() 62 assertCalendarEquals(calendar, 2011, 9, 16, 1, 0); // 01:00 GMT-2; +23 hours in testAddOneDayOverDstForwardAdds23HoursAt0100() 73 Calendar calendar = new GregorianCalendar(AMERICA_SAO_PAULO); in testAddOneDayOverDstForwardAdds24HoursAt0000() local 74 calendar.set(2011, 9, 15, 0, 0); // 00:00 GMT-3 in testAddOneDayOverDstForwardAdds24HoursAt0000() 75 double hoursSinceEpoch = hoursSinceEpoch(calendar); in testAddOneDayOverDstForwardAdds24HoursAt0000() 76 calendar.add(Calendar.DATE, 1); in testAddOneDayOverDstForwardAdds24HoursAt0000() [all …]
|
D | GregorianCalendarTest.java | 292 GregorianCalendar calendar = GregorianCalendar.from(zdt); in test_fromZonedDateTime() local 294 assertEquals(timeZone, calendar.getTimeZone()); in test_fromZonedDateTime() 295 assertEquals(2007, calendar.get(Calendar.YEAR)); in test_fromZonedDateTime() 296 assertEquals(Calendar.DECEMBER, calendar.get(Calendar.MONTH)); in test_fromZonedDateTime() 297 assertEquals(3, calendar.get(Calendar.DAY_OF_MONTH)); in test_fromZonedDateTime() 298 assertEquals(10, calendar.get(Calendar.HOUR_OF_DAY)); in test_fromZonedDateTime() 299 assertEquals(15, calendar.get(Calendar.MINUTE)); in test_fromZonedDateTime() 300 assertEquals(3600 * 1000, calendar.getTimeZone().getRawOffset()); // in milliseconds in test_fromZonedDateTime() 320 GregorianCalendar calendar = new GregorianCalendar(timeZone); in test_toZonedDateTime() local 321 calendar.set(2007, Calendar.DECEMBER, 3, 10, 15, 30); in test_toZonedDateTime() [all …]
|
D | CalendarWeekOfMonthTest.java | 219 Calendar calendar = new GregorianCalendar( in test() local 221 calendar.setFirstDayOfWeek(firstDayOfWeek); in test() 222 calendar.setMinimalDaysInFirstWeek(minimalDaysInFirstWeek); in test() 223 calendar.setTimeInMillis(timeInMillis); in test() 225 assertEquals(toString(), expectedWeekOfMonth, calendar.get(Calendar.WEEK_OF_MONTH)); in test()
|
D | SimpleTimeZoneTest.java | 262 GregorianCalendar calendar = new GregorianCalendar(timeZone, Locale.ENGLISH); in checkDstTransitionTimes() local 263 calendar.set(year, Calendar.JANUARY, 1, 0, 0, 0); in checkDstTransitionTimes() 264 calendar.set(Calendar.MILLISECOND, 0); in checkDstTransitionTimes() 265 long start = calendar.getTimeInMillis(); in checkDstTransitionTimes()
|
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/ |
D | AbstractCalendar.java | 27 package sun.util.calendar; 30 public abstract class AbstractCalendar extends sun.util.calendar.CalendarSystem { 36 public sun.util.calendar.Era getEra(java.lang.String eraName) { in getEra() 41 public sun.util.calendar.Era[] getEras() { in getEras() 45 public void setEra(sun.util.calendar.CalendarDate date, java.lang.String eraName) { in setEra() 49 protected void setEras(sun.util.calendar.Era[] eras) { in setEras() 53 public sun.util.calendar.CalendarDate getCalendarDate() { in getCalendarDate() 57 public sun.util.calendar.CalendarDate getCalendarDate(long millis) { in getCalendarDate() 61 public sun.util.calendar.CalendarDate getCalendarDate(long millis, java.util.TimeZone zone) { in getCalendarDate() 65 public sun.util.calendar.CalendarDate getCalendarDate( in getCalendarDate() [all …]
|
D | CalendarSystem.java | 27 package sun.util.calendar; 38 public static sun.util.calendar.Gregorian getGregorianCalendar() { in getGregorianCalendar() 43 public static sun.util.calendar.CalendarSystem forName(java.lang.String calendarName) { in forName() 53 public abstract sun.util.calendar.CalendarDate getCalendarDate(); in getCalendarDate() 55 public abstract sun.util.calendar.CalendarDate getCalendarDate(long millis); in getCalendarDate() 57 public abstract sun.util.calendar.CalendarDate getCalendarDate( in getCalendarDate() 58 long millis, sun.util.calendar.CalendarDate date); in getCalendarDate() 60 public abstract sun.util.calendar.CalendarDate getCalendarDate( in getCalendarDate() 63 public abstract sun.util.calendar.CalendarDate newCalendarDate(); in newCalendarDate() 66 public abstract sun.util.calendar.CalendarDate newCalendarDate(java.util.TimeZone zone); in newCalendarDate() [all …]
|
D | LocalGregorianCalendar.java | 26 package sun.util.calendar; 29 public class LocalGregorianCalendar extends sun.util.calendar.BaseCalendar { 31 private LocalGregorianCalendar(java.lang.String name, sun.util.calendar.Era[] eras) { in LocalGregorianCalendar() 35 static sun.util.calendar.LocalGregorianCalendar getLocalGregorianCalendar( in getLocalGregorianCalendar() 44 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate() { in getCalendarDate() 48 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate(long millis) { in getCalendarDate() 52 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate( in getCalendarDate() 57 public sun.util.calendar.LocalGregorianCalendar.Date getCalendarDate( in getCalendarDate() 58 long millis, sun.util.calendar.CalendarDate date) { in getCalendarDate() 62 private sun.util.calendar.LocalGregorianCalendar.Date adjustYear( in adjustYear() [all …]
|
D | ImmutableGregorianDate.java | 26 package sun.util.calendar; 29 class ImmutableGregorianDate extends sun.util.calendar.BaseCalendar.Date { 31 ImmutableGregorianDate(sun.util.calendar.BaseCalendar.Date date) { in ImmutableGregorianDate() 35 public sun.util.calendar.Era getEra() { in getEra() 39 public sun.util.calendar.CalendarDate setEra(sun.util.calendar.Era era) { in setEra() 47 public sun.util.calendar.CalendarDate setYear(int year) { in setYear() 51 public sun.util.calendar.CalendarDate addYear(int n) { in addYear() 67 public sun.util.calendar.CalendarDate setMonth(int month) { in setMonth() 71 public sun.util.calendar.CalendarDate addMonth(int n) { in addMonth() 79 public sun.util.calendar.CalendarDate setDayOfMonth(int date) { in setDayOfMonth() [all …]
|
D | CalendarDate.java | 26 package sun.util.calendar; 40 public sun.util.calendar.Era getEra() { in getEra() 44 public sun.util.calendar.CalendarDate setEra(sun.util.calendar.Era era) { in setEra() 53 public sun.util.calendar.CalendarDate setYear(int year) { in setYear() 57 public sun.util.calendar.CalendarDate addYear(int n) { in addYear() 74 public sun.util.calendar.CalendarDate setMonth(int month) { in setMonth() 78 public sun.util.calendar.CalendarDate addMonth(int n) { in addMonth() 88 public sun.util.calendar.CalendarDate setDayOfMonth(int date) { in setDayOfMonth() 92 public sun.util.calendar.CalendarDate addDayOfMonth(int n) { in addDayOfMonth() 105 public sun.util.calendar.CalendarDate setHours(int hours) { in setHours() [all …]
|
D | BaseCalendar.java | 26 package sun.util.calendar; 29 public abstract class BaseCalendar extends sun.util.calendar.AbstractCalendar { 35 public boolean validate(sun.util.calendar.CalendarDate date) { in validate() 39 public boolean normalize(sun.util.calendar.CalendarDate date) { in normalize() 43 void normalizeMonth(sun.util.calendar.CalendarDate date) { in normalizeMonth() 47 public int getYearLength(sun.util.calendar.CalendarDate date) { in getYearLength() 51 public int getYearLengthInMonths(sun.util.calendar.CalendarDate date) { in getYearLengthInMonths() 55 public int getMonthLength(sun.util.calendar.CalendarDate date) { in getMonthLength() 63 public long getDayOfYear(sun.util.calendar.CalendarDate date) { in getDayOfYear() 71 public long getFixedDate(sun.util.calendar.CalendarDate date) { in getFixedDate() [all …]
|
D | Era.java | 26 package sun.util.calendar; 59 public sun.util.calendar.CalendarDate getSinceDate() { in getSinceDate() 105 private final sun.util.calendar.CalendarDate sinceDate;
|
D | CalendarUtils.java | 26 package sun.util.calendar;
|
/libcore/ojluni/src/main/resources/ |
D | calendars.properties | 26 # Japanese imperial calendar 33 calendar.japanese.type: LocalGregorianCalendar 34 calendar.japanese.eras: \ 42 # Taiwanese calendar 44 calendar.taiwanese.type: LocalGregorianCalendar 45 calendar.taiwanese.eras: \ 49 # Thai Buddhist calendar 51 calendar.thai-buddhist.type: LocalGregorianCalendar 52 calendar.thai-buddhist.eras: \ 54 calendar.thai-buddhist.year-boundary: \ [all …]
|
D | hijrah-config-umalqura.properties | 24 # This properties file defines a Hijrah calendar variant. 31 # <iso-start> ::= 'iso-start' '=' <start date in the ISO calendar> 40 # Identifies the type of calendar in the standard calendar ID scheme 62 # Standard calendar type specification
|
/libcore/ojluni/src/main/java/java/text/ |
D | DateFormat.java | 160 protected Calendar calendar; field in DateFormat 649 this.calendar = newCalendar; in setCalendar() 659 return calendar; in getCalendar() 698 calendar.setTimeZone(zone); in setTimeZone() 712 return calendar.getTimeZone(); in getTimeZone() 734 calendar.setLenient(lenient); in setLenient() 750 return calendar.isLenient(); in isLenient() 769 calendar.getFirstDayOfWeek() == other.calendar.getFirstDayOfWeek() && in equals() 770 … calendar.getMinimalDaysInFirstWeek() == other.calendar.getMinimalDaysInFirstWeek() && in equals() 771 calendar.isLenient() == other.calendar.isLenient() && in equals() [all …]
|
D | SimpleDateFormat.java | 63 import sun.util.calendar.CalendarUtils; 734 if (calendar == null) { in initializeCalendar() 740 calendar = Calendar.getInstance(TimeZone.getDefault(), loc); in initializeCalendar() 997 calendar.setTimeInMillis(System.currentTimeMillis()); in initializeDefaultCentury() 998 calendar.add( Calendar.YEAR, -80 ); in initializeDefaultCentury() 999 parseAmbiguousDatesAsAfter(calendar.getTime()); in initializeDefaultCentury() 1007 calendar.setTime(startDate); in parseAmbiguousDatesAsAfter() 1008 defaultCenturyStartYear = calendar.get(Calendar.YEAR); in parseAmbiguousDatesAsAfter() 1060 calendar.setTime(date); in format() 1243 if (calendar.isWeekDateSupported()) { in subFormat() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | CalendarTest.java | 570 Calendar calendar = Calendar.getInstance(); in test_clear() local 590 calendar.set(2008, 3, 20, 17, 28, 12); in test_clear() 595 calendar.clear(index); in test_clear() 599 calendar.get(index)); in test_clear() 603 calendar.get(index)); in test_clear() 607 + defaults[i] + ".", defaults[i], calendar.get(index)); in test_clear() 612 calendar.set(2008, 3, 20, 17, 28, 12); in test_clear() 614 calendar.clear(); in test_clear() 619 + defaults[i] + ".", defaults[i], calendar.get(index)); in test_clear() 627 Calendar calendar = Calendar.getInstance(); in test_isSet() local [all …]
|
/libcore/luni/src/main/java/libcore/icu/ |
D | DateUtilsBridge.java | 61 Calendar calendar = new GregorianCalendar(icuTimeZone, icuLocale); in createIcuCalendar() local 62 calendar.setTimeInMillis(timeInMillis); in createIcuCalendar() 63 return calendar; in createIcuCalendar() 66 /* package */ static String toSkeleton(Calendar calendar, int flags) { in toSkeleton() argument 67 return toSkeleton(calendar, calendar, flags); in toSkeleton()
|
D | LocaleData.java | 406 Calendar calendar = Calendar.getInstance(locale); in initializeCalendarData() local 408 firstDayOfWeek = calendar.getFirstDayOfWeek(); in initializeCalendarData() 409 minimalDaysInFirstWeek = calendar.getMinimalDaysInFirstWeek(); in initializeCalendarData()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 361 Calendar calendar = new GregorianCalendar(AMERICA_LOS_ANGELES); in testDstZoneNameWithNonDstTimestamp() local 362 calendar.setTime(format.parse("2011-06-21T10:00 Pacific Standard Time")); // 18:00 GMT-8 in testDstZoneNameWithNonDstTimestamp() 363 assertEquals(11, calendar.get(Calendar.HOUR_OF_DAY)); // 18:00 GMT-7 in testDstZoneNameWithNonDstTimestamp() 364 assertEquals(0, calendar.get(Calendar.MINUTE)); in testDstZoneNameWithNonDstTimestamp() 369 Calendar calendar = new GregorianCalendar(AMERICA_LOS_ANGELES); in testNonDstZoneNameWithDstTimestamp() local 370 calendar.setTime(format.parse("2010-12-21T10:00 Pacific Daylight Time")); // 17:00 GMT-7 in testNonDstZoneNameWithDstTimestamp() 371 assertEquals(9, calendar.get(Calendar.HOUR_OF_DAY)); // 17:00 GMT-8 in testNonDstZoneNameWithDstTimestamp() 372 assertEquals(0, calendar.get(Calendar.MINUTE)); in testNonDstZoneNameWithDstTimestamp() 378 Calendar calendar = new GregorianCalendar(AUSTRALIA_LORD_HOWE); in testDstZoneWithNonDstTimestampForNonHourDstZone() local 379 calendar.setTime(format.parse("2011-06-21T20:00 Lord Howe Daylight Time")); // 9:00 GMT+11 in testDstZoneWithNonDstTimestampForNonHourDstZone() [all …]
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | JapaneseEra.java | 86 import sun.util.calendar.CalendarDate; 131 static final sun.util.calendar.Era[] ERA_CONFIG; 215 sun.util.calendar.Era getPrivateEra() { in getPrivateEra() 323 static JapaneseEra toJapaneseEra(sun.util.calendar.Era privateEra) { in toJapaneseEra() 332 static sun.util.calendar.Era privateEraFrom(LocalDate isoDate) { in privateEraFrom()
|
/libcore/luni/src/test/java/tests/targets/security/cert/ |
D | CertificateTest.java | 754 Calendar calendar = Calendar.getInstance(); in createPKIXParams() local 755 calendar.clear(); in createPKIXParams() 756 calendar.set(2016, Calendar.JANUARY, 1); in createPKIXParams() 757 params.setDate(calendar.getTime()); in createPKIXParams()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Date.java | 36 import sun.util.calendar.BaseCalendar; 37 import sun.util.calendar.CalendarDate; 38 import sun.util.calendar.CalendarSystem; 39 import sun.util.calendar.CalendarUtils; 40 import sun.util.calendar.Era; 41 import sun.util.calendar.Gregorian;
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | Gregorian.java | 26 package sun.util.calendar;
|
/libcore/luni/src/test/java/libcore/libcore/icu/ |
D | LocaleDataTest.java | 196 Calendar calendar = Calendar.getInstance(Locale.ROOT); in assertRootDataEqualsToTargetLocaleData() local 246 assertEquals(calendar.getFirstDayOfWeek(), icuCalendar.getFirstDayOfWeek()); in assertRootDataEqualsToTargetLocaleData() 247 assertEquals(calendar.getMinimalDaysInFirstWeek(), icuCalendar.getMinimalDaysInFirstWeek()); in assertRootDataEqualsToTargetLocaleData()
|