Calendar c = Calendar.getInstance();
int currentMonth = c.get(Calendar.MONTH) + 1;
int i=currentMonth/3*3;
c.set(Calendar.MONTH,i);
c.set(Calendar.DATE,1);
System.out.println(c.getTime());
Calendar //获取当前年的季度的第一天
最新推荐文章于 2022-07-25 10:52:39 发布