LocalDateTime 使用记录
1.LocalDateTime 获取指定日期的月初和月末
LocalDateTime firstDayTime = LocalDate.now().withMonth(12).withDayOfMonth(1).atStartOfDay(); System.out.println("firstDayTime: " + firstDayTime); LocalDateTime lastDayTime = firstDayTime.plusMonths(1); System.out.println("lastDayTime: " + lastDayTime);