- fromSet.setOnCalendar(fromCalendar, status);
- if (U_FAILURE(status)) {
- errln(caseString+" FAIL: Failed to set on Source calendar: "
- + u_errorName(status));
- return;
+ if(useDate){
+ fromCalendar->setTime(fromDate, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+" FAIL: Failed to set time on Source calendar: "
+ + u_errorName(status));
+ return;
+ }
+ } else {
+ fromSet.setOnCalendar(fromCalendar, status);
+ if (U_FAILURE(status)) {
+ errln(caseString+" FAIL: Failed to set on Source calendar: "
+ + u_errorName(status));
+ return;
+ }