public static void main(String[] args) throws ParseException {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, 2017); // 2010年
c.set(Calendar.MONTH, 3); // 6 月
System.out.println("------------" + c.get(Calendar.YEAR) + "年" + (c.get(Calendar.MONTH) + 1) + "月的天数和周数-------------");
System.out.println("天数:" + c.getActualMaximum(Calendar.DAY_OF_MONTH));
System.out.println("周数:" + c.getActualMaximum(Calendar.WEEK_OF_MONTH));
}