Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一个org.threeten.bp.LocalDateTime对象中有两个日期。我需要找出这两个日期之间的天数差异。
org.threeten.bp.LocalDateTime
使用org.threeten.bp.temporal.ChronoUnit.between:
org.threeten.bp.temporal.ChronoUnit.between
long days = ChronoUnit.DAYS.between(fromDate, toDate);