1.計(jì)算時(shí)間差: ChronoUnit.DAYS.between(fromDate, toDate); ChronoUnit是一個(gè)枚舉類听皿,除DAYS外還包括其他時(shí)間單位笛谦。