/libcore/luni/src/test/java/libcore/java/util/ |
D | CalendarTest.java | 53 Calendar calendar = new GregorianCalendar(AMERICA_SAO_PAULO); in testAddOneDayOverDstForwardAdds23HoursAt0100() local 54 calendar.set(2011, 9, 15, 1, 0); // 01:00 GMT-3 in testAddOneDayOverDstForwardAdds23HoursAt0100() 55 double hoursSinceEpoch = hoursSinceEpoch(calendar); in testAddOneDayOverDstForwardAdds23HoursAt0100() 56 calendar.add(Calendar.DATE, 1); in testAddOneDayOverDstForwardAdds23HoursAt0100() 57 assertEquals(23.0, hoursSinceEpoch(calendar) - hoursSinceEpoch); in testAddOneDayOverDstForwardAdds23HoursAt0100() 58 assertCalendarEquals(calendar, 2011, 9, 16, 1, 0); // 01:00 GMT-2; +23 hours in testAddOneDayOverDstForwardAdds23HoursAt0100() 69 Calendar calendar = new GregorianCalendar(AMERICA_SAO_PAULO); in testAddOneDayOverDstForwardAdds24HoursAt0000() local 70 calendar.set(2011, 9, 15, 0, 0); // 00:00 GMT-3 in testAddOneDayOverDstForwardAdds24HoursAt0000() 71 double hoursSinceEpoch = hoursSinceEpoch(calendar); in testAddOneDayOverDstForwardAdds24HoursAt0000() 72 calendar.add(Calendar.DATE, 1); in testAddOneDayOverDstForwardAdds24HoursAt0000() [all …]
|
/libcore/luni/src/main/java/java/text/ |
D | DateFormat.java | 72 protected Calendar calendar; field in DateFormat 230 clone.calendar = (Calendar) calendar.clone(); in clone() 256 && calendar.getTimeZone().equals( in equals() 257 dateFormat.calendar.getTimeZone()) in equals() 258 && calendar.getFirstDayOfWeek() == dateFormat.calendar in equals() 260 && calendar.getMinimalDaysInFirstWeek() == dateFormat.calendar in equals() 262 && calendar.isLenient() == dateFormat.calendar.isLenient(); in equals() 345 return calendar; in getCalendar() 520 return calendar.getTimeZone(); in getTimeZone() 525 return calendar.getFirstDayOfWeek() in hashCode() [all …]
|
D | SimpleDateFormat.java | 374 calendar = new GregorianCalendar(locale); in SimpleDateFormat() 375 calendar.add(Calendar.YEAR, -80); in SimpleDateFormat() 376 creationYear = calendar.get(Calendar.YEAR); in SimpleDateFormat() 377 defaultCenturyStart = calendar.getTime(); in SimpleDateFormat() 527 calendar.setTime(date); in formatImpl() 588 buffer.append(formatData.eras[calendar.get(Calendar.ERA)]); in append() 592 int year = calendar.get(Calendar.YEAR); in append() 618 int hour = calendar.get(Calendar.HOUR_OF_DAY); in append() 635 int value = calendar.get(Calendar.MILLISECOND); in append() 664 buffer.append(formatData.ampms[calendar.get(Calendar.AM_PM)]); in append() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | DateToStringBenchmark.java | 29 Calendar calendar; field in DateToStringBenchmark 35 calendar = new GregorianCalendar(); in setUp() 36 calendar.setTime(date); in setUp() 60 DateFormat.format("EEE MMM dd HH:mm:ss zzz yyyy", calendar); in timeDateToString_AndroidDateFormat()
|
/libcore/luni/src/main/java/java/util/ |
D | Formatter.java | 1813 Calendar calendar; in transformFromDateTime() local 1815 calendar = (Calendar) arg; in transformFromDateTime() 1825 calendar = Calendar.getInstance(locale); in transformFromDateTime() 1826 calendar.setTime(date); in transformFromDateTime() 1830 if (!appendT(result, formatToken.getDateSuffix(), calendar)) { in transformFromDateTime() 1836 private boolean appendT(StringBuilder result, char conversion, Calendar calendar) { in appendT() argument 1839 result.append(localeData.longWeekdayNames[calendar.get(Calendar.DAY_OF_WEEK)]); in appendT() 1842 result.append(localeData.shortWeekdayNames[calendar.get(Calendar.DAY_OF_WEEK)]); in appendT() 1845 result.append(localeData.longMonthNames[calendar.get(Calendar.MONTH)]); in appendT() 1848 result.append(localeData.shortMonthNames[calendar.get(Calendar.MONTH)]); in appendT() [all …]
|
D | Calendar.java | 750 public boolean after(Object calendar) { in after() argument 751 if (!(calendar instanceof Calendar)) { in after() 754 return getTimeInMillis() > ((Calendar) calendar).getTimeInMillis(); in after() 769 public boolean before(Object calendar) { in before() argument 770 if (!(calendar instanceof Calendar)) { in before() 773 return getTimeInMillis() < ((Calendar) calendar).getTimeInMillis(); in before()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 286 Calendar calendar = new GregorianCalendar(AMERICA_LOS_ANGELES); in testDstZoneNameWithNonDstTimestamp() local 287 calendar.setTime(format.parse("2011-06-21T10:00 Pacific Standard Time")); // 18:00 GMT-8 in testDstZoneNameWithNonDstTimestamp() 288 assertEquals(11, calendar.get(Calendar.HOUR_OF_DAY)); // 18:00 GMT-7 in testDstZoneNameWithNonDstTimestamp() 289 assertEquals(0, calendar.get(Calendar.MINUTE)); in testDstZoneNameWithNonDstTimestamp() 294 Calendar calendar = new GregorianCalendar(AMERICA_LOS_ANGELES); in testNonDstZoneNameWithDstTimestamp() local 295 calendar.setTime(format.parse("2010-12-21T10:00 Pacific Daylight Time")); // 17:00 GMT-7 in testNonDstZoneNameWithDstTimestamp() 296 assertEquals(9, calendar.get(Calendar.HOUR_OF_DAY)); // 17:00 GMT-8 in testNonDstZoneNameWithDstTimestamp() 297 assertEquals(0, calendar.get(Calendar.MINUTE)); in testNonDstZoneNameWithDstTimestamp() 303 Calendar calendar = new GregorianCalendar(AUSTRALIA_LORD_HOWE); in testDstZoneWithNonDstTimestampForNonHourDstZone() local 304 calendar.setTime(format.parse("2011-06-21T20:00 Lord Howe Daylight Time")); // 9:00 GMT+11 in testDstZoneWithNonDstTimestampForNonHourDstZone() [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
D | OpenSSLX509CRLEntry.java | 109 Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); in getRevocationDate() local 110 calendar.set(Calendar.MILLISECOND, 0); in getRevocationDate() 112 calendar); in getRevocationDate() local 113 return calendar.getTime(); in getRevocationDate()
|
D | OpenSSLX509CRL.java | 262 Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); in getThisUpdate() local 263 calendar.set(Calendar.MILLISECOND, 0); in getThisUpdate() 265 calendar); in getThisUpdate() local 266 return calendar.getTime(); in getThisUpdate() 271 Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); in getNextUpdate() local 272 calendar.set(Calendar.MILLISECOND, 0); in getNextUpdate() 274 calendar); in getNextUpdate() local 275 return calendar.getTime(); in getNextUpdate()
|
D | OpenSSLX509Certificate.java | 245 Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); in getNotBefore() local 246 calendar.set(Calendar.MILLISECOND, 0); in getNotBefore() 247 NativeCrypto.ASN1_TIME_to_Calendar(NativeCrypto.X509_get_notBefore(mContext), calendar); in getNotBefore() local 248 return calendar.getTime(); in getNotBefore() 253 Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); in getNotAfter() local 254 calendar.set(Calendar.MILLISECOND, 0); in getNotAfter() 255 NativeCrypto.ASN1_TIME_to_Calendar(NativeCrypto.X509_get_notAfter(mContext), calendar); in getNotAfter() local 256 return calendar.getTime(); in getNotAfter()
|
/libcore/luni/src/test/java/tests/api/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/test/java/tests/api/javax/security/cert/ |
D | X509CertificateTest.java | 314 Calendar calendar = Calendar.getInstance(); in testCheckValidity2() local 316 calendar.set(i * 500, Calendar.JANUARY, 1); in testCheckValidity2() 317 date[i] = calendar.getTime(); in testCheckValidity2()
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | Duration.java | 528 public abstract void addTo(Calendar calendar); in addTo() argument
|
/libcore/luni/src/main/native/ |
D | libcore_icu_ICU.cpp | 418 ScopedResourceBundle calendar(ures_getByKey(root.get(), "calendar", NULL, &status)); in getDateTimePatterns() local 422 ScopedResourceBundle gregorian(ures_getByKey(calendar.get(), "gregorian", NULL, &status)); in getDateTimePatterns() 469 ScopedResourceBundle calendar(ures_getByKey(root.get(), "calendar", NULL, &status)); in getYesterdayTodayAndTomorrow() local 473 ScopedResourceBundle gregorian(ures_getByKey(calendar.get(), "gregorian", NULL, &status)); in getYesterdayTodayAndTomorrow()
|
D | org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp | 4580 …void NativeCrypto_ASN1_TIME_to_Calendar(JNIEnv* env, jclass, jlong asn1TimeRef, jobject calendar) { in NativeCrypto_ASN1_TIME_to_Calendar() argument 4582 JNI_TRACE("ASN1_TIME_to_Calendar(%p, %p)", asn1Time, calendar); in NativeCrypto_ASN1_TIME_to_Calendar() 4611 env->CallVoidMethod(calendar, calendar_setMethod, year, mon - 1, mday, hour, min, sec); in NativeCrypto_ASN1_TIME_to_Calendar()
|