根据日期得到当月第一天和最后一天

Calendar paycal= Calendar.getInstance();

paycal.setTime(new Date());

paycal.add(Calendar.DATE, 1);

Date startdate = paycal.getTime();

paycal.set(Calendar.DATE, paycal.getActualMaximum(Calendar.DATE)); 

Date enddate = paycal.getTime();

你可能感兴趣的:(日期)