Java语言 LocalDateTime 计算时间差
最近工作中需要通过 LocalDateTime 计算时间差,特此记录便于日后查阅。@Testpublic void tr(){ final LocalDateTime fromDate = LocalDateTime.now(); final LocalDateTime toDate = LocalDateTime.now().plusHours(56); long minutes = ChronoUnit.MINUTES.between(fromDate, toDate)