Java - get Month Days

摘要:Java - get Month Days

取得今天的這個月份有幾天
 
Calendar c = Calendar.getInstance();
c.setTimeZone(TimeZone.getTimeZone("Asia/Taipei"));
c.setTime(new Date());

int month_days = c.getActualMaximum(Calendar.DAY_OF_MONTH);