LocalDateTime Get the first and last day of the current month and get the start time of the day

        // 获取当前月第一天及最后一天
        LocalDateTime firstDayOfMonth = LocalDateTime.of(LocalDate.from(LocalDateTime.now().with(TemporalAdjusters.firstDayOfMonth())), LocalTime.MIN);
        LocalDateTime lastDayOfMonth = LocalDateTime.of(LocalDate.from(LocalDateTime.now().with(TemporalAdjusters.lastDayOfMonth())), LocalTime.MAX);

Supongo que te gusta

Origin blog.csdn.net/aq_money/article/details/129065339
Recomendado
Clasificación