localdatetime获取本月第一天及最后一天

本月第一天0时0分
LocalDateTime.of(LocalDate.from(LocalDateTime.now().with(TemporalAdjusters.firstDayOfMonth())), LocalTime.MIN);
本月最后一天23:59:59
LocalDateTime.of(LocalDate.from(LocalDateTime.now().with(TemporalAdjusters.lastDayOfMonth())), LocalTime.MAX);

参考:
https://blog.csdn.net/weixin_41018853/article/details/102934284
https://blog.csdn.net/qq_41267618/article/details/102914243
posted @ 2020-09-07 13:58  山兮木  阅读(9758)  评论(1编辑  收藏  举报
/* 看板娘 */