![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小工具
Chocolate_men
日常随机分享一些代码片段
展开
-
Java 获取当前月份的最后一天
public static String getLastDay() { SimpleDateFormat sm = new SimpleDateFormat("yyyy-MM-dd"); Calendar calast = Calendar.getInstance(); calast.set(Calendar.DAY_OF_MONTH, calast.getActualMaxi...原创 2020-01-16 14:41:06 · 1143 阅读 · 0 评论 -
java 判断当前季度
private static int getQuarterOfYear() { Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); return calendar.get(Calendar.MONTH) / 3 + 1;}原创 2020-01-16 14:38:06 · 5258 阅读 · 2 评论