Java获取某月天数
- Calendar cal = new GregorianCalendar();
-
-
-
- SimpleDateFormat oSdf = new SimpleDateFormat ("",Locale.ENGLISH);
- oSdf.applyPattern("yyyyMM");
- try {
- System.out.println(oSdf.parse(date));
- cal.setTime(oSdf.parse(date));
- } catch (ParseException e) {
- e.printStackTrace();
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- int num2 = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
-
- System.out.println(num2);
Java获取某月天数
原文:http://www.cnblogs.com/handsome1013/p/5955939.html