![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java日常
joenhon
这个作者很懒,什么都没留下…
展开
-
LocalDate 跨年快速计算月差
LocalDate date = LocalDate.now(); LocalDate time = LocalDate.now(); Integer diff = time.getYear() - date.getYear(); Integer month = time.getMonthValue() + (sff*12);原创 2022-01-19 11:52:20 · 1335 阅读 · 0 评论 -
LocalDate快速获取当前季度
LocalDate start = LocalDate.now();int quarter = (start.getMonthValue()-1)/3 + 1;start = start.withMonth(quarter*3 - 2*quarter);System.out.println(quarter);System.out.println(start);原创 2022-01-07 18:09:11 · 4838 阅读 · 0 评论