Lines Matching refs:cal
144 GregorianCalendar *cal = (GregorianCalendar*)Calendar::createInstance(status); in test4100311() local
147 delete cal; in test4100311()
151 cal->set(UCAL_YEAR, 1997); in test4100311()
152 cal->set(UCAL_DAY_OF_YEAR, 1); in test4100311()
153 UDate d = cal->getTime(status); // Should be Jan 1 in test4100311()
156 delete cal; in test4100311()
167 GregorianCalendar *cal = new GregorianCalendar(status); in test4074758() local
170 delete cal; in test4074758()
175 cal->set(97, UCAL_JANUARY, 1, h, 34); in test4074758()
177 logln(UnicodeString("HOUR=") + cal->get(UCAL_HOUR, status)); //prints 0 in test4074758()
179 logln(UnicodeString("HOUR_OF_DAY=") + cal->get(UCAL_HOUR_OF_DAY, status)); in test4074758()
183 delete cal; in test4074758()
241 CalendarRegressionTest::printdate(GregorianCalendar *cal, const char *string) in printdate() argument
245 log(UnicodeString("") + cal->get(UCAL_MONTH, status)) ; in printdate()
247 int32_t date = cal->get(UCAL_DATE, status) + 1 ; in printdate()
250 logln(UnicodeString("/") + cal->get(UCAL_YEAR, status)) ; in printdate()
285 GregorianCalendar *cal = new GregorianCalendar(zone, status); in test4031502() local
287 cal->clear(); in test4031502()
288 cal->set(1900, 15, 5, 5, 8, 13); in test4031502()
289 if (cal->get(UCAL_HOUR, status) != 5 || U_FAILURE(status)) { in test4031502()
293 cal->get(UCAL_DST_OFFSET,status) / (60*60*1000) + " " + in test4031502()
295 ": HOUR = " + cal->get(UCAL_HOUR,status)); in test4031502()
298 delete cal; in test4031502()
382 Calendar *cal = Calendar::createInstance(status); in test4051765() local
385 delete cal; in test4051765()
388 cal->setLenient(FALSE); in test4051765()
389 cal->set(UCAL_DAY_OF_WEEK, 0); in test4051765()
391 cal->getTime(status); in test4051765()
399 delete cal; in test4051765()
496 Calendar *cal = Calendar::createInstance(TimeZone::createTimeZone("GMT"), in test4061476() local
500 delete cal; in test4061476()
504 fmt->adoptCalendar(cal); in test4061476()
508 cal->setTime(date, status); in test4061476()
512 cal->set(UCAL_HOUR_OF_DAY, 13); in test4061476()
513 logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status)); in test4061476()
514 cal->add(UCAL_HOUR_OF_DAY, 6,status); in test4061476()
515 logln(UnicodeString("Hour: ")+cal->get(UCAL_HOUR_OF_DAY, status)); in test4061476()
516 if (cal->get(UCAL_HOUR_OF_DAY, status) != 19) in test4061476()
517 errln(UnicodeString("Fail: Want 19 Got ") + cal->get(UCAL_HOUR_OF_DAY, status)); in test4061476()
528 Calendar *cal = new GregorianCalendar(status); in test4070502() local
531 delete cal; in test4070502()
535 cal->setTime(d,status); in test4070502()
536 if (cal->get(UCAL_DAY_OF_WEEK,status) == UCAL_SATURDAY || in test4070502()
537 cal->get(UCAL_DAY_OF_WEEK,status) == UCAL_SUNDAY) in test4070502()
540 delete cal; in test4070502()
553 GregorianCalendar *cal = new GregorianCalendar(status); in getAssociatedDate() local
554 cal->setTime(d,status); in getAssociatedDate()
558 int32_t wd = cal->get(UCAL_DAY_OF_WEEK, status); in getAssociatedDate()
560 cal->add(UCAL_DATE, 1, status); in getAssociatedDate()
567 UDate dd = cal->getTime(status); in getAssociatedDate()
568 delete cal; in getAssociatedDate()
584 GregorianCalendar *cal = new GregorianCalendar(status); in dowTest() local
587 delete cal; in dowTest()
590 cal->set(1997, UCAL_AUGUST, 12); // Wednesday in dowTest()
592 cal->setLenient(lenient); in dowTest()
593 cal->set(1996, UCAL_DECEMBER, 1); // Set the date to be December 1, 1996 in dowTest()
594 int32_t dow = cal->get(UCAL_DAY_OF_WEEK, status); in dowTest()
595 int32_t min = cal->getMinimum(UCAL_DAY_OF_WEEK); in dowTest()
596 int32_t max = cal->getMaximum(UCAL_DAY_OF_WEEK); in dowTest()
607 delete cal; in dowTest()
611 if(cal->getActualMinimum(UCAL_DAY_OF_WEEK, status) != min) { in dowTest()
614 if(cal->getActualMinimum(Calendar::DAY_OF_WEEK, status) != min) { in dowTest()
617 if(cal->getActualMinimum(Calendar::DAY_OF_WEEK) != min) { in dowTest()
620 if(((Calendar*)cal)->getActualMinimum(UCAL_DAY_OF_WEEK, status) != min) { in dowTest()
632 delete cal; in dowTest()
641 Calendar *cal = Calendar::createInstance(status); in test4071385() local
644 delete cal; in test4071385()
647 cal->setTime(makeDate(1998, UCAL_JUNE, 24),status); in test4071385()
648 cal->set(UCAL_MONTH, UCAL_NOVEMBER); // change a field in test4071385()
650 if (cal->getTime(status) != makeDate(1998, UCAL_NOVEMBER, 24)) in test4071385()
653 delete cal; in test4071385()
718 Calendar *cal = new GregorianCalendar(status); in test4083167() local
721 delete cal; in test4083167()
724 cal->setTime(firstDate,status); in test4083167()
725 int32_t hr = cal->get(UCAL_HOUR_OF_DAY, status); in test4083167()
726 int32_t min = cal->get(UCAL_MINUTE, status); in test4083167()
727 int32_t sec = cal->get(UCAL_SECOND, status); in test4083167()
728 int32_t msec = cal->get(UCAL_MILLISECOND, status); in test4083167()
735 cal->setTime(lastDate, status); in test4083167()
736 hr = cal->get(UCAL_HOUR_OF_DAY, status); in test4083167()
737 min = cal->get(UCAL_MINUTE, status); in test4083167()
738 sec = cal->get(UCAL_SECOND, status); in test4083167()
739 msec = cal->get(UCAL_MILLISECOND, status); in test4083167()
751 delete cal; in test4083167()
768 Calendar *cal = Calendar::createInstance(status); in test4086724() local
771 delete cal; in test4086724()
776 cal->set(1997,UCAL_SEPTEMBER,30); in test4086724()
777 UDate now = cal->getTime(status); in test4086724()
781 cal->set(1997,UCAL_JANUARY,1); in test4086724()
782 now=cal->getTime(status); in test4086724()
784 cal->set(1997,UCAL_JANUARY,8); in test4086724()
785 now=cal->getTime(status); in test4086724()
787 cal->set(1996,UCAL_DECEMBER,31); in test4086724()
788 now=cal->getTime(status); in test4086724()
798 delete cal; in test4086724()
971 GregorianCalendar *cal = (GregorianCalendar*)Calendar::createInstance(status); in test41003112() local
974 delete cal; in test41003112()
977 cal->set(UCAL_YEAR, 1997); in test41003112()
978 cal->set(UCAL_DAY_OF_YEAR, 1); in test41003112()
981 if (cal->get(UCAL_DAY_OF_YEAR, status) != 1) in test41003112()
983 delete cal; in test41003112()
1273 Calendar *cal = Calendar::createInstance(status); in test4108764() local
1276 delete cal; in test4108764()
1285 cal->setTime(d11,status); in test4108764()
1287 cal->clear( UCAL_MINUTE ); in test4108764()
1288 logln(UnicodeString("") + cal->getTime(status)); in test4108764()
1289 if (cal->getTime(status) != d01) in test4108764()
1292 cal->set( UCAL_SECOND, 0 ); in test4108764()
1293 logln(UnicodeString("") + cal->getTime(status)); in test4108764()
1294 if (cal->getTime(status) != d00) in test4108764()
1297 cal->setTime(d11,status); in test4108764()
1298 cal->set( UCAL_SECOND, 0 ); in test4108764()
1299 logln(UnicodeString("") + cal->getTime(status)); in test4108764()
1300 if (cal->getTime(status) != d10) in test4108764()
1303 cal->clear( UCAL_MINUTE ); in test4108764()
1304 logln(UnicodeString("") + cal->getTime(status)); in test4108764()
1305 if (cal->getTime(status) != d00) in test4108764()
1308 cal->clear(); in test4108764()
1309 logln(UnicodeString("") + cal->getTime(status)); in test4108764()
1310 if (cal->getTime(status) != epoch) in test4108764()
1313 delete cal; in test4108764()
1323 Calendar *cal = Calendar::createInstance(status); in test4114578() local
1326 delete cal; in test4114578()
1329 cal->adoptTimeZone(TimeZone::createTimeZone("PST")); in test4114578()
1356 cal->setTime(date,status); in test4114578()
1361 cal->add(UCAL_HOUR, amt,status); in test4114578()
1365 cal->roll(UCAL_HOUR, amt,status); in test4114578()
1369 log(UnicodeString("") + cal->getTime(status)); in test4114578()
1371 double change = cal->getTime(status) - date; in test4114578()
1381 delete cal; in test4114578()
1391 Calendar *cal = Calendar::createInstance(status); in test4118384() local
1394 delete cal; in test4118384()
1397 if (cal->getMaximum(UCAL_HOUR) != 11 || in test4118384()
1398 cal->getLeastMaximum(UCAL_HOUR) != 11 || in test4118384()
1399 cal->getActualMaximum(UCAL_HOUR,status) != 11) in test4118384()
1403 if (cal->getLeastMaximum(Calendar::HOUR) != 11 || in test4118384()
1404 cal->getMaximum(Calendar::HOUR) != 11) { in test4118384()
1408 if (cal->getGreatestMinimum(Calendar::HOUR) != 0 || in test4118384()
1409 cal->getMinimum(Calendar::HOUR) != 0) { in test4118384()
1413 delete cal; in test4118384()
1414 cal = Calendar::createInstance(Locale("th_TH@calendar=buddhist"),status); in test4118384()
1417 delete cal; in test4118384()
1421 if (cal->getLeastMaximum(Calendar::HOUR) != 11 || in test4118384()
1422 cal->getMaximum(Calendar::HOUR) != 11) { in test4118384()
1426 if (cal->getGreatestMinimum(Calendar::HOUR) != 0 || in test4118384()
1427 cal->getMinimum(Calendar::HOUR) != 0) { in test4118384()
1431 delete cal; in test4118384()
1433 cal = Calendar::createInstance(Locale("ja_JP@calendar=japanese"),status); in test4118384()
1436 delete cal; in test4118384()
1439 if (cal->getLeastMaximum(Calendar::HOUR) != 11 || in test4118384()
1440 cal->getMaximum(Calendar::HOUR) != 11) { in test4118384()
1444 if (cal->getGreatestMinimum(Calendar::HOUR) != 0 || in test4118384()
1445 cal->getMinimum(Calendar::HOUR) != 0) { in test4118384()
1449 delete cal; in test4118384()
1459 …LocalPointer<GregorianCalendar> cal((GregorianCalendar*) Calendar::createInstance(status), status); in test4125881() local
1469 cal->clear(); in test4125881()
1471 cal->set(UCAL_ERA, y < 1 ? GregorianCalendar::BC : GregorianCalendar::AD); in test4125881()
1472 cal->set(UCAL_YEAR, y < 1 ? 1 - y : y); in test4125881()
1474 …logln(UnicodeString("") + y + UnicodeString(" = ") + fmt.format(cal->getTime(status), temp) + " " + in test4125881()
1475 cal->isLeapYear(y)); in test4125881()
1476 if (cal->isLeapYear(y) != ((y+40)%4 == 0)) in test4125881()
1488 …LocalPointer<GregorianCalendar> cal((GregorianCalendar*) Calendar::createInstance(status), status); in test4125892() local
1498 cal->clear(); in test4125892()
1499 cal->set(UCAL_ERA, GregorianCalendar::BC); in test4125892()
1500 cal->set(UCAL_YEAR, 81); // 81 BC is a leap year (proleptically) in test4125892()
1501 cal->set(UCAL_MONTH, UCAL_FEBRUARY); in test4125892()
1502 cal->set(UCAL_DATE, 28); in test4125892()
1503 cal->add(UCAL_DATE, 1,status); in test4125892()
1506 if (cal->get(UCAL_DATE,status) != 29 || in test4125892()
1507 !cal->isLeapYear(-80)) // -80 == 81 BC in test4125892()
1519 GregorianCalendar *cal = new GregorianCalendar(status); in test4141665() local
1522 delete cal; in test4141665()
1525 GregorianCalendar *cal2 = cal->clone(); in test4141665()
1526 UDate cut = cal->getGregorianChange(); in test4141665()
1528 if (*cal != *cal2) { in test4141665()
1532 if ( *cal == *cal2) { in test4141665()
1536 delete cal; in test4141665()
1548 GregorianCalendar *cal = new GregorianCalendar(status); in Test13745() local
1551 delete cal; in Test13745()
1556 cal->setGregorianChange(((double)INT32_MAX+1.0) * MILLIS_IN_DAY, status); in Test13745()
1561 …assertEquals("getGregorianChange()", (double)INT32_MAX * MILLIS_IN_DAY, cal->getGregorianChange()); in Test13745()
1564 cal->setGregorianChange(((double)INT32_MIN-1.0) * MILLIS_IN_DAY, status); in Test13745()
1569 …assertEquals("getGregorianChange()", (double)INT32_MIN * MILLIS_IN_DAY, cal->getGregorianChange()); in Test13745()
1571 delete cal; in Test13745()
1793 GregorianCalendar *cal = new GregorianCalendar(tz, status); in Test4162587() local
1803 cal->clear(); in Test4162587()
1804 cal->set(1998, UCAL_APRIL, 5, i, 0); in Test4162587()
1805 d0 = cal->getTime(status); in Test4162587()
1811 cal->clear(); in Test4162587()
1812 cal->set(1998, UCAL_APRIL, 4, i+24, 0); in Test4162587()
1813 dPlus = cal->getTime(status); in Test4162587()
1819 cal->clear(); in Test4162587()
1820 cal->set(1998, UCAL_APRIL, 6, i-24, 0); in Test4162587()
1821 dMinus = cal->getTime(status); in Test4162587()
1833 delete cal; in Test4162587()
2024 GregorianCalendar cal(status); in Test4197699() local
2025 cal.setFirstDayOfWeek(UCAL_MONDAY); in Test4197699()
2026 cal.setMinimalDaysInFirstWeek(4); in Test4197699()
2029 fmt.setCalendar(cal); in Test4197699()
2044 cal.clear(); in Test4197699()
2045 cal.set(DATA[i], DATA[i+1], DATA[i+2]); in Test4197699()
2048 int32_t actWOY = cal.get(UCAL_WEEK_OF_YEAR, status); in Test4197699()
2050 logln(UnicodeString("Ok: ") + dfmt.format(cal.getTime(status), str.remove())); in Test4197699()
2052 errln(UnicodeString("FAIL: ") + dfmt.format(cal.getTime(status), str.remove()) in Test4197699()
2054 cal.add(UCAL_DATE, -8, status); in Test4197699()
2056 cal.add(UCAL_DATE, 1, status); in Test4197699()
2057 logln(dfmt.format(cal.getTime(status), str.remove())); in Test4197699()
2090 GregorianCalendar cal(TimeZone::createTimeZone("GMT"), Locale::getUS(), status); in TestJ81() local
2096 fmt.setCalendar(cal); in TestJ81()
2098 UDate cutover = cal.getGregorianChange(); in TestJ81()
2146 cal.set(1582, UCAL_OCTOBER, DOY_DATA[i]); in TestJ81()
2147 int32_t woy = cal.get(UCAL_WEEK_OF_YEAR, status); in TestJ81()
2148 int32_t doy = cal.get(UCAL_DAY_OF_YEAR, status); in TestJ81()
2149 int32_t dow = cal.get(UCAL_DAY_OF_WEEK, status); in TestJ81()
2157 fmt.format(cal.getTime(status), temp.remove()) + in TestJ81()
2159 logln(CalendarTest::calToStr(cal)); in TestJ81()
2164 fmt.format(cal.getTime(status), temp.remove())); in TestJ81()
2165 logln(CalendarTest::calToStr(cal)); in TestJ81()
2169 cal.clear(); in TestJ81()
2170 cal.set(UCAL_YEAR, 1582); in TestJ81()
2171 cal.set(UCAL_WEEK_OF_YEAR, DOY_DATA[i+1]); in TestJ81()
2172 cal.set(UCAL_DAY_OF_WEEK, DOY_DATA[i+3]); in TestJ81()
2173 int32_t dom = cal.get(UCAL_DATE, status); in TestJ81()
2181 fmt.format(cal.getTime(status), temp.remove()) + in TestJ81()
2183 logln(CalendarTest::calToStr(cal)); in TestJ81()
2188 cal.clear(); in TestJ81()
2189 cal.set(UCAL_YEAR, 1582); in TestJ81()
2190 cal.set(UCAL_DAY_OF_YEAR, DOY_DATA[i+2]); in TestJ81()
2191 dom = cal.get(UCAL_DATE, status); in TestJ81()
2199 fmt.format(cal.getTime(status), temp.remove()) + in TestJ81()
2250 cal.setTime(date, status); in TestJ81()
2256 cal.add(DATA[i].field, amount, status); in TestJ81()
2258 cal.roll(DATA[i].field, amount, status); in TestJ81()
2266 UDate result = cal.getTime(status); in TestJ81()
2312 Calendar& cal = *pcal; in TestJ438() local
2319 fmt.setCalendar(cal); in TestJ438()
2330 cal.clear(); in TestJ438()
2331 cal.set(y1, m1, d1); in TestJ438()
2332 UDate date1 = cal.getTime(ec); in TestJ438()
2335 cal.set(y2, m2, d2); in TestJ438()
2336 UDate date2 = cal.getTime(ec); in TestJ438()
2340 cal.setTime(date1, ec); in TestJ438()
2343 int32_t dy = cal.fieldDifference(date2, UCAL_YEAR, ec); in TestJ438()
2344 int32_t dm = cal.fieldDifference(date2, UCAL_MONTH, ec); in TestJ438()
2345 int32_t dd = cal.fieldDifference(date2, UCAL_DATE, ec); in TestJ438()
2350 LocalPointer<Calendar> cal2(cal.clone()); in TestJ438()
2373 cal.setTime(date1, ec); in TestJ438()
2376 cal.add(UCAL_YEAR, dy, ec); in TestJ438()
2377 cal.add(UCAL_MONTH, dm, ec); in TestJ438()
2378 cal.add(UCAL_DATE, dd, ec); in TestJ438()
2381 UDate date22 = cal.getTime(ec); in TestJ438()
2405 Calendar *cal = Calendar::createInstance(ec); in TestT5555() local
2407 if (cal == NULL || U_FAILURE(ec)) { in TestT5555()
2409 delete cal; in TestT5555()
2414 cal->set(2007, UCAL_FEBRUARY, 21); in TestT5555()
2417 cal->add(UCAL_MONTH, 36, ec); in TestT5555()
2420 cal->set(UCAL_DAY_OF_WEEK_IN_MONTH, -1); in TestT5555()
2422 cal->getTime(ec); in TestT5555()
2426 yy = cal->get(UCAL_YEAR, ec); in TestT5555()
2427 mm = cal->get(UCAL_MONTH, ec); in TestT5555()
2428 dd = cal->get(UCAL_DATE, ec); in TestT5555()
2429 ee = cal->get(UCAL_DAY_OF_WEEK, ec); in TestT5555()
2435 delete cal; in TestT5555()
2482 Calendar *cal = Calendar::createInstance(Locale(testLocalePtr->locale), status); in TestT6745() local
2490 …cal->set( testItemPtr->startYear + testLocalePtr->yearOffset, testItemPtr->startMonth, testItemPtr… in TestT6745()
2491 cal->add( testItemPtr->fieldToChange, testItemPtr->fieldDelta, status ); in TestT6745()
2498 int32_t year = cal->get(UCAL_YEAR, status); in TestT6745()
2499 int32_t month = cal->get(UCAL_MONTH, status); in TestT6745()
2500 int32_t day = cal->get(UCAL_DATE, status); in TestT6745()
2508 delete cal; in TestT6745()
2518 Calendar* cal = Calendar::createInstance(ec); in TestLeapFieldDifference() local
2519 if (cal == NULL || U_FAILURE(ec)) { in TestLeapFieldDifference()
2521 delete cal; in TestLeapFieldDifference()
2524 cal->set(2004, UCAL_FEBRUARY, 29); in TestLeapFieldDifference()
2525 UDate date2004 = cal->getTime(ec); in TestLeapFieldDifference()
2526 cal->set(2000, UCAL_FEBRUARY, 29); in TestLeapFieldDifference()
2527 UDate date2000 = cal->getTime(ec); in TestLeapFieldDifference()
2530 delete cal; in TestLeapFieldDifference()
2533 int32_t y = cal->fieldDifference(date2004, UCAL_YEAR, ec); in TestLeapFieldDifference()
2534 int32_t d = cal->fieldDifference(date2004, UCAL_DAY_OF_YEAR, ec); in TestLeapFieldDifference()
2537 delete cal; in TestLeapFieldDifference()
2545 cal->setTime(date2004, ec); in TestLeapFieldDifference()
2546 y = cal->fieldDifference(date2000, UCAL_YEAR, ec); in TestLeapFieldDifference()
2547 d = cal->fieldDifference(date2000, UCAL_DAY_OF_YEAR, ec); in TestLeapFieldDifference()
2550 delete cal; in TestLeapFieldDifference()
2559 cal->set(2001, UCAL_APRIL, 5); // 2452005 in TestLeapFieldDifference()
2560 UDate ayl = cal->getTime(ec); in TestLeapFieldDifference()
2561 cal->set(1964, UCAL_SEPTEMBER, 7); // 2438646 in TestLeapFieldDifference()
2562 UDate asl = cal->getTime(ec); in TestLeapFieldDifference()
2565 delete cal; in TestLeapFieldDifference()
2568 d = cal->fieldDifference(ayl, UCAL_DATE, ec); in TestLeapFieldDifference()
2569 cal->setTime(ayl, ec); in TestLeapFieldDifference()
2570 int32_t d2 = cal->fieldDifference(asl, UCAL_DATE, ec); in TestLeapFieldDifference()
2573 delete cal; in TestLeapFieldDifference()
2582 delete cal; in TestLeapFieldDifference()
2591 Calendar* cal = Calendar::createInstance(loc, ec); in TestMalaysianInstance() local
2595 delete cal; in TestMalaysianInstance()
2605 GregorianCalendar cal(TimeZone::createTimeZone("America/Los_Angeles"), in TestWeekShift() local
2611 cal.setTime(UDate(997257600000.0), ec); // Wed Aug 08 01:00:00 PDT 2001 in TestWeekShift()
2624 cal.setFirstDayOfWeek(UCAL_WEDNESDAY); in TestWeekShift()
2625 cal.setMinimalDaysInFirstWeek(4); in TestWeekShift()
2627 cal.setFirstDayOfWeek(UCAL_SUNDAY); in TestWeekShift()
2628 cal.setMinimalDaysInFirstWeek(4); in TestWeekShift()
2630 cal.add(UCAL_DATE, 1, ec); // Force recalc in TestWeekShift()
2631 cal.add(UCAL_DATE, -1, ec); in TestWeekShift()
2633 UDate time1 = cal.getTime(ec); // Get time -- should not change in TestWeekShift()
2639 cal.setFirstDayOfWeek(UCAL_THURSDAY); in TestWeekShift()
2641 cal.setMinimalDaysInFirstWeek(5); in TestWeekShift()
2644 int32_t woy1 = cal.get(UCAL_WEEK_OF_YEAR, ec); in TestWeekShift()
2645 int32_t wom1 = cal.get(UCAL_WEEK_OF_MONTH, ec); in TestWeekShift()
2647 cal.add(UCAL_DATE, 1, ec); // Force recalc in TestWeekShift()
2648 cal.add(UCAL_DATE, -1, ec); in TestWeekShift()
2650 int32_t woy2 = cal.get(UCAL_WEEK_OF_YEAR, ec); in TestWeekShift()
2651 int32_t wom2 = cal.get(UCAL_WEEK_OF_MONTH, ec); in TestWeekShift()
2653 UDate time2 = cal.getTime(ec); in TestWeekShift()
2708 Calendar *cal = Calendar::createInstance(t, locale, ec); in TestTimeZoneTransitionAdd() local
2709 if (cal == NULL || U_FAILURE(ec)) { in TestTimeZoneTransitionAdd()
2711 delete cal; in TestTimeZoneTransitionAdd()
2715 cal->clear(); in TestTimeZoneTransitionAdd()
2717 cal->set(UCAL_YEAR, 2002); in TestTimeZoneTransitionAdd()
2718 cal->set(UCAL_MONTH, UCAL_DECEMBER); in TestTimeZoneTransitionAdd()
2719 cal->set(UCAL_DATE, 25); in TestTimeZoneTransitionAdd()
2722 UDate yesterday = cal->getTime(ec); in TestTimeZoneTransitionAdd()
2723 int32_t yesterday_day = cal->get(UCAL_DATE, ec); in TestTimeZoneTransitionAdd()
2724 cal->add(UCAL_DATE, 1, ec); in TestTimeZoneTransitionAdd()
2725 if (yesterday_day == cal->get(UCAL_DATE, ec)) { in TestTimeZoneTransitionAdd()
2728 dateFormat.format(cal->getTime(ec), buf2)); in TestTimeZoneTransitionAdd()
2733 delete cal; in TestTimeZoneTransitionAdd()
2750 Calendar *cal = Calendar::createInstance(status); in makeDate() local
2751 cal->clear(); in makeDate()
2753 cal->set(UCAL_YEAR, y); in makeDate()
2755 if(m != 0) cal->set(UCAL_MONTH, m); in makeDate()
2756 if(d != 0) cal->set(UCAL_DATE, d); in makeDate()
2757 if(hr != 0) cal->set(UCAL_HOUR, hr); in makeDate()
2758 if(min != 0) cal->set(UCAL_MINUTE, min); in makeDate()
2759 if(sec != 0) cal->set(UCAL_SECOND, sec); in makeDate()
2761 result = cal->getTime(status); in makeDate()
2763 delete cal; in makeDate()
2867 GregorianCalendar *cal = (GregorianCalendar*)Calendar::createInstance(status); in TestT8057() local
2870 delete cal; in TestT8057()
2873 cal->setLenient(FALSE); in TestT8057()
2874 cal->clear(); in TestT8057()
2875 cal->set(2008, UCAL_DECEMBER, 31); in TestT8057()
2878 UDate t = cal->getTime(status); in TestT8057()
2881 delete cal; in TestT8057()
2887 cal->add(UCAL_YEAR, 1, status); in TestT8057()
2888 t = cal->getTime(status); in TestT8057()
2897 delete cal; in TestT8057()
2947 GregorianCalendar cal(TimeZone::createTimeZone("Pacific/Apia"), status); in TestT9452() local
2952 sdf.setCalendar(cal); in TestT9452()
2957 cal.clear(); in TestT9452()
2958 cal.set(2011, UCAL_DECEMBER, 29, 0, 0, 0); in TestT9452()
2960 UDate d = cal.getTime(status); in TestT9452()
2966 cal.add(UCAL_DATE, 1, status); in TestT9452()
2968 d = cal.getTime(status); in TestT9452()
2976 cal.add(UCAL_DATE, -1, status); in TestT9452()
2978 d = cal.getTime(status); in TestT9452()
2992 GregorianCalendar cal(TimeZone::createTimeZone("Pacific/Apia"), status); in TestT11632() local
2998 cal.clear(); in TestT11632()
3000 cal.set(UCAL_HOUR, 597); in TestT11632()
3004 sdf.setCalendar(cal); in TestT11632()
3006 UDate d = cal.getTime(status); in TestT11632()
3012 cal.clear(); in TestT11632()
3014 cal.set(UCAL_HOUR, 300); in TestT11632()
3016 sdf.setCalendar(cal); in TestT11632()
3017 d = cal.getTime(status); in TestT11632()
3033 Calendar* cal = Calendar::createInstance(Locale(localeID), status); in TestPersianCalOverflow() local
3037 int32_t maxMonth = cal->getMaximum(UCAL_MONTH); in TestPersianCalOverflow()
3038 int32_t maxDayOfMonth = cal->getMaximum(UCAL_DATE); in TestPersianCalOverflow()
3042 cal->clear(); in TestPersianCalOverflow()
3043 cal->set(UCAL_JULIAN_DAY, jd); in TestPersianCalOverflow()
3044 month = cal->get(UCAL_MONTH, status); in TestPersianCalOverflow()
3045 dayOfMonth = cal->get(UCAL_DATE, status); in TestPersianCalOverflow()
3053 delete cal; in TestPersianCalOverflow()
3063 Calendar* cal = Calendar::createInstance(Locale(localeID), status); in TestIslamicCalOverflow() local
3067 int32_t maxMonth = cal->getMaximum(UCAL_MONTH); in TestIslamicCalOverflow()
3068 int32_t maxDayOfMonth = cal->getMaximum(UCAL_DATE); in TestIslamicCalOverflow()
3072 cal->clear(); in TestIslamicCalOverflow()
3073 cal->set(UCAL_JULIAN_DAY, jd); in TestIslamicCalOverflow()
3074 year = cal->get(UCAL_YEAR, status); in TestIslamicCalOverflow()
3075 month = cal->get(UCAL_MONTH, status); in TestIslamicCalOverflow()
3076 dayOfMonth = cal->get(UCAL_DATE, status); in TestIslamicCalOverflow()
3084 delete cal; in TestIslamicCalOverflow()
3091 LocalPointer<Calendar> cal(Calendar::createInstance(status)); in TestWeekOfYear13548() local
3094 cal->set(UCAL_YEAR, year); in TestWeekOfYear13548()
3095 cal->set(UCAL_WEEK_OF_YEAR, 4); in TestWeekOfYear13548()
3097 int32_t resultYear = cal->get(UCAL_YEAR, status); in TestWeekOfYear13548()