Calendar cal = Calendar.getInstance();
cal.set(Calendar.YEAR, 2019);
cal.set(Calendar.MONTH, 11);
cal.set(Calendar.DAY_OF_MONTH,cal.getActualMaximum(Calendar.DATE));
System.out.println("結束時間"+new SimpleDateFormat( "yyyy-MM-dd ").format(cal.getTime()));
cal.set(Calendar.DAY_OF_MONTH,cal.getMinimum(Calendar.DATE));
System.out.println("開始時間"+new SimpleDateFormat( "yyyy-MM-dd ").format(cal.getTime()));
//注意月份是從0開始的,如果要查10月,那么必須要10-1=9 才是查詢的10月份的日期
