Date date = new Date();
Calendar c = Calendar.getInstance();
c.setTime(date);
c.setTimeZone(TimeZone.getTimeZone("CST"));
System.out.println(c.get(Calendar.WEEK_OF_YEAR));
获取不同时区当前是全年第几周
最新推荐文章于 2023-02-22 11:03:06 发布
Date date = new Date();
Calendar c = Calendar.getInstance();
c.setTime(date);
c.setTimeZone(TimeZone.getTimeZone("CST"));
System.out.println(c.get(Calendar.WEEK_OF_YEAR));