我想比较给定期间的日期。我使用之前和之后的方法。这是我的方法。
public boolean compareDatePeriod() throws ParseException
{
[.....]
if (period.getDateStart().after(dateLine)){
if (period.getDateEnd().before(dateLine)){
result = true;
}
}
;
return result;
}
如果我的 dateLine = "01/01/2012" 和我的 period.getDateStart () = "01/01/2012"。我返回错误。我不懂为什么?