Home
last modified time | relevance | path

Searched refs:cal1 (Results 1 – 25 of 28) sorted by relevance

12

/external/apache-commons-lang/src/main/java/org/apache/commons/lang3/time/
DDateUtils.java182 public static boolean isSameDay(final Calendar cal1, final Calendar cal2) { in isSameDay() argument
183 Objects.requireNonNull(cal1, "cal1"); in isSameDay()
185 return cal1.get(Calendar.ERA) == cal2.get(Calendar.ERA) && in isSameDay()
186 cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && in isSameDay()
187 cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR); in isSameDay()
218 public static boolean isSameInstant(final Calendar cal1, final Calendar cal2) { in isSameInstant() argument
219 Objects.requireNonNull(cal1, "cal1"); in isSameInstant()
221 return cal1.getTime().getTime() == cal2.getTime().getTime(); in isSameInstant()
236 public static boolean isSameLocalTime(final Calendar cal1, final Calendar cal2) { in isSameLocalTime() argument
237 Objects.requireNonNull(cal1, "cal1"); in isSameLocalTime()
[all …]
/external/icu/icu4c/source/test/intltest/
Dcalregts.cpp193 GregorianCalendar *cal1 = new GregorianCalendar(status) ; in test4028518() local
196 delete cal1; in test4028518()
200 GregorianCalendar *cal2 = cal1->clone() ; in test4028518()
202 printdate(cal1, "cal1: ") ; in test4028518()
204 cal1->add(UCAL_DATE, 1, status) ; in test4028518()
206 printdate(cal1, "cal1 after adding 1 day:") ; in test4028518()
208 delete cal1; in test4028518()
217 LocalPointer<GregorianCalendar> cal1(new GregorianCalendar(status), status); in Test9019() local
223 cal1->set(UCAL_HOUR, 1); in Test9019()
225 cal1->clear(); in Test9019()
[all …]
Dcaltest.cpp3503 LocalPointer<Calendar> cal1(Calendar::createInstance(LOCALE_PAIRS[i], status)); in TestWeekData() local
3508 UCalendarDaysOfWeek dow1 = cal1->getFirstDayOfWeek(status); in TestWeekData()
3514 uint8_t minDays1 = cal1->getMinimalDaysInFirstWeek(); in TestWeekData()
3521 UCalendarWeekdayType wdt1 = cal1->getDayOfWeekType((UCalendarDaysOfWeek)d, status); in TestWeekData()
/external/cronet/third_party/icu/source/test/intltest/
Dcalregts.cpp192 GregorianCalendar *cal1 = new GregorianCalendar(status) ; in test4028518() local
195 delete cal1; in test4028518()
199 GregorianCalendar *cal2 = cal1->clone() ; in test4028518()
201 printdate(cal1, "cal1: ") ; in test4028518()
203 cal1->add(UCAL_DATE, 1, status) ; in test4028518()
205 printdate(cal1, "cal1 after adding 1 day:") ; in test4028518()
207 delete cal1; in test4028518()
216 LocalPointer<GregorianCalendar> cal1(new GregorianCalendar(status), status); in Test9019() local
222 cal1->set(UCAL_HOUR, 1); in Test9019()
224 cal1->clear(); in Test9019()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/calendar/
DCalendarRegressionTest.java476 GregorianCalendar cal1 = new GregorianCalendar(1997, 10, 11, 10, 20, 40); in Test4092362() local
483 logln( " Cal1 = " + cal1.getTime().getTime() ); in Test4092362()
484 logln( " Cal1 time in ms = " + cal1.get(Calendar.MILLISECOND) ); in Test4092362()
498 if( !cal1.equals( cal2 ) ) in Test4092362()
516 Calendar cal1 = new GregorianCalendar(PST); in Test4096231() local
517 cal1.setTime(new Date(880698639000L)); in Test4096231()
519 logln("PST 1 is: " + (p=cal1.get(Calendar.HOUR_OF_DAY))); in Test4096231()
520 cal1.setTimeZone(GMT); in Test4096231()
524 logln("GMT 1 is: " + (h1=cal1.get(Calendar.HOUR_OF_DAY))); in Test4096231()
525 cal1.setTime(new Date(880698639000L)); in Test4096231()
[all …]
DDangiTest.java398 DangiCalendar cal1 = new DangiCalendar(); in TestCoverage() local
399 cal1.setTime(d); in TestCoverage()
406 assertEquals("DangiCalendar() and DangiCalendar(Date)", cal1, cal2); in TestCoverage()
407 assertEquals("DangiCalendar() and DangiCalendar(TimeZone,ULocale)", cal1, cal3); in TestCoverage()
410 String type = cal1.getType(); in TestCoverage()
DIBMCalendarTest.java1777 Calendar cal1 = Calendar.getInstance(new ULocale(LOCALE_PAIRS[i])); in TestWeekData() local
1781 int dow1 = cal1.getFirstDayOfWeek(); in TestWeekData()
1788 int minDays1 = cal1.getMinimalDaysInFirstWeek(); in TestWeekData()
1796 int wdt1 = cal1.getDayOfWeekType(d); in TestWeekData()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/
DCalendarRegressionTest.java473 GregorianCalendar cal1 = new GregorianCalendar(1997, 10, 11, 10, 20, 40); in Test4092362() local
480 logln( " Cal1 = " + cal1.getTime().getTime() ); in Test4092362()
481 logln( " Cal1 time in ms = " + cal1.get(Calendar.MILLISECOND) ); in Test4092362()
495 if( !cal1.equals( cal2 ) ) in Test4092362()
513 Calendar cal1 = new GregorianCalendar(PST); in Test4096231() local
514 cal1.setTime(new Date(880698639000L)); in Test4096231()
516 logln("PST 1 is: " + (p=cal1.get(Calendar.HOUR_OF_DAY))); in Test4096231()
517 cal1.setTimeZone(GMT); in Test4096231()
521 logln("GMT 1 is: " + (h1=cal1.get(Calendar.HOUR_OF_DAY))); in Test4096231()
522 cal1.setTime(new Date(880698639000L)); in Test4096231()
[all …]
DDangiTest.java395 DangiCalendar cal1 = new DangiCalendar(); in TestCoverage() local
396 cal1.setTime(d); in TestCoverage()
403 assertEquals("DangiCalendar() and DangiCalendar(Date)", cal1, cal2); in TestCoverage()
404 assertEquals("DangiCalendar() and DangiCalendar(TimeZone,ULocale)", cal1, cal3); in TestCoverage()
407 String type = cal1.getType(); in TestCoverage()
DIBMCalendarTest.java1774 Calendar cal1 = Calendar.getInstance(new ULocale(LOCALE_PAIRS[i])); in TestWeekData() local
1778 int dow1 = cal1.getFirstDayOfWeek(); in TestWeekData()
1785 int minDays1 = cal1.getMinimalDaysInFirstWeek(); in TestWeekData()
1793 int wdt1 = cal1.getDayOfWeekType(d); in TestWeekData()
/external/icu/icu4c/source/samples/dtitvfmtsample/
Ddtitvfmtsample.cpp97 Calendar *cal1 = Calendar::createInstance(status); in dtitvfmtCustomized() local
98 cal1->set(2007,9,10,10,10,10); in dtitvfmtCustomized()
104 new DateInterval(cal1->getTime(status),cal2->getTime(status)), in dtitvfmtCustomized()
/external/cronet/third_party/icu/source/samples/dtitvfmtsample/
Ddtitvfmtsample.cpp97 Calendar *cal1 = Calendar::createInstance(status); in dtitvfmtCustomized() local
98 cal1->set(2007,9,10,10,10,10); in dtitvfmtCustomized()
104 new DateInterval(cal1->getTime(status),cal2->getTime(status)), in dtitvfmtCustomized()
/external/apache-commons-lang/src/test/java/org/apache/commons/lang3/time/
DFastDatePrinterTest.java173 final GregorianCalendar cal1 = new GregorianCalendar(2003, 0, 10, 15, 33, 20); in testFormat() local
175 final Date date1 = cal1.getTime(); in testFormat()
184 assertEquals("2003-01-10T15:33:20", fdf.format(cal1)); in testFormat()
192 assertEquals("-0500", fdf.format(cal1)); in testFormat()
201 assertEquals("-05:00", fdf.format(cal1)); in testFormat()
DDurationFormatUtilsTest.java52 final Calendar cal1 = Calendar.getInstance(); in assertEqualDuration() local
53 cal1.set(start[0], start[1], start[2], start[3], start[4], start[5]); in assertEqualDuration()
54 cal1.set(Calendar.MILLISECOND, 0); in assertEqualDuration()
58 final long milli1 = cal1.getTime().getTime(); in assertEqualDuration()
DDateUtilsTest.java61 …private static void assertCalendarsEquals(final String message, final Calendar cal1, final Calenda… in assertCalendarsEquals() argument
62 assertFalse(Math.abs(cal1.getTime().getTime() - cal2.getTime().getTime()) > delta, in assertCalendarsEquals()
63 message + " expected " + cal1.getTime() + " but got " + cal2.getTime()); in assertCalendarsEquals()
142 private Calendar cal1; field in DateUtilsTest
207 cal1 = Calendar.getInstance(); in setUp()
208 cal1.setTime(date1); in setUp()
522 DateUtils.ceiling((Object) cal1, Calendar.SECOND), in testCeil()
1041 DateUtils.round((Object) cal1, Calendar.SECOND), in testRound()
1524 DateUtils.truncate((Object) cal1, Calendar.SECOND), in testTruncate()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/timezone/
DTimeZoneTest.java613 Calendar cal1 = Calendar.getInstance(); in TestRuleAPI() local
614 cal1.set(1990, Calendar.JANUARY, 1); in TestRuleAPI()
617 _testUsingBinarySearch(zone, cal1.getTimeInMillis(), in TestRuleAPI()
619 cal1.set(1990, Calendar.JUNE, 1); in TestRuleAPI()
621 _testUsingBinarySearch(zone, cal1.getTimeInMillis(), in TestRuleAPI()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/
DTimeZoneTest.java610 Calendar cal1 = Calendar.getInstance(); in TestRuleAPI() local
611 cal1.set(1990, Calendar.JANUARY, 1); in TestRuleAPI()
614 _testUsingBinarySearch(zone, cal1.getTimeInMillis(), in TestRuleAPI()
616 cal1.set(1990, Calendar.JUNE, 1); in TestRuleAPI()
618 _testUsingBinarySearch(zone, cal1.getTimeInMillis(), in TestRuleAPI()
/external/cronet/third_party/icu/source/i18n/
Ducal.cpp460 ucal_equivalentTo( const UCalendar* cal1, in ucal_equivalentTo() argument
464 return ((Calendar*)cal1)->isEquivalentTo(*((Calendar*)cal2)); in ucal_equivalentTo()
/external/icu/icu4c/source/i18n/
Ducal.cpp460 ucal_equivalentTo( const UCalendar* cal1, in ucal_equivalentTo() argument
464 return ((Calendar*)cal1)->isEquivalentTo(*((Calendar*)cal2)); in ucal_equivalentTo()
/external/cronet/third_party/icu/source/i18n/unicode/
Ducal.h1133 ucal_equivalentTo(const UCalendar* cal1,
/external/icu/libicu/cts_headers/unicode/
Ducal.h1133 ucal_equivalentTo(const UCalendar* cal1,
/external/icu/libandroidicu/include/unicode/
Ducal.h1133 ucal_equivalentTo(const UCalendar* cal1,
/external/icu/icu4c/source/i18n/unicode/
Ducal.h1133 ucal_equivalentTo(const UCalendar* cal1,
/external/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/format/
DGlobalizationPreferencesTest.java666 Calendar cal1 = gp.getCalendar(); in TestCalendar() local
667 if (cal1.getFirstDayOfWeek() == cal.getFirstDayOfWeek()) { in TestCalendar()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DGlobalizationPreferencesTest.java669 Calendar cal1 = gp.getCalendar(); in TestCalendar() local
670 if (cal1.getFirstDayOfWeek() == cal.getFirstDayOfWeek()) { in TestCalendar()

12