Java怎么比较日期

走着路睡觉
  • java
小于 1 分钟


if(todayDate.after(historyDate)) {
    //todayDate > historyDate
}
if( todayDate.before(futureDate)) {
    //todayDate < historyDate
}

if(todayDate.after(historyDate) && todayDate.before(futureDate)) {
    //futureDate > todayDate > historyDate
}

上次编辑于:
贡献者: zhaojingbo
Loading...