Lines Matching refs:fieldDifference
2203 * Test fieldDifference().
2247 int32_t dy = cal.fieldDifference(date2, UCAL_YEAR, ec);
2248 int32_t dm = cal.fieldDifference(date2, UCAL_MONTH, ec);
2249 int32_t dd = cal.fieldDifference(date2, UCAL_DATE, ec);
2250 if (failure(ec, "fieldDifference"))
2259 int32_t dy2 = cal2->fieldDifference(date2, Calendar::YEAR, ec2);
2260 int32_t dm2 = cal2->fieldDifference(date2, Calendar::MONTH, ec2);
2261 int32_t dd2 = cal2->fieldDifference(date2, Calendar::DATE, ec2);
2262 if (failure(ec2, "fieldDifference(date, Calendar::DATE, ec)"))
2267 errln("fieldDifference(UCAL_...) and fieldDifference(Calendar::...) give different results!\n");
2417 * Test behavior of fieldDifference around leap years. Also test a large
2437 int32_t y = cal->fieldDifference(date2004, UCAL_YEAR, ec);
2438 int32_t d = cal->fieldDifference(date2004, UCAL_DAY_OF_YEAR, ec);
2440 errln("FAIL: fieldDifference()");
2450 y = cal->fieldDifference(date2000, UCAL_YEAR, ec);
2451 d = cal->fieldDifference(date2000, UCAL_DAY_OF_YEAR, ec);
2453 errln("FAIL: setTime() / fieldDifference()");
2472 d = cal->fieldDifference(ayl, UCAL_DATE, ec);
2474 int32_t d2 = cal->fieldDifference(asl, UCAL_DATE, ec);
2476 errln("FAIL: setTime() / fieldDifference()");