java基础:
Instant createTime = date.toInstant();
Instant nowTime = Instant.now(); // 当前的时间
long days = Duration.between(createTime, nowTime).toDays();
计算日期差java8函数
最新推荐文章于 2025-06-04 10:34:41 发布
java基础:
Instant createTime = date.toInstant();
Instant nowTime = Instant.now(); // 当前的时间
long days = Duration.between(createTime, nowTime).toDays();