所以我花了相当多的谷歌搜索和浏览东西,但我就是无法让它工作。即使 request.getEnd() 比当前 startCal.getTime 晚了几天,它也不会认为该声明是真的。有任何想法吗?
while(startCal.after(request.getEnd()))
{
/* Calculate new beginning */
startCal.add(Calendar.DATE, 1);
newBegin = startCal.getTime();
System.out.println(newBegin);
/* Calculate new ending */
endCal.add(Calendar.DATE, 1);
newEnd = endCal.getTime();
/* Setting new dates and series ID */
localRequest.setBegin(newBegin);
localRequest.setEnd(newEnd);
localRequest.setSeriesID(seriesID);
/* Sending new reservation to database */
//reserve(localRequest);
System.out.println("RESERVATION DONE");
}