String dataStr = "2019-04";try {Date date = DateUtils.parseDate(dataStr);Date startTime = DateUtils.getStartTime(DateUtils.DateType.MONTHLY, date, null);Date endTime = DateUtils.getEndTime(DateUtils.DateType.MONTHLY, date);Pairpair = null;Iterator > iterator = DateUtils.getIterator(startTime, endTime, DateType.DAILY, false);while(iterator.hasNext()){pair = iterator.next();System.out.println("startTime:" + DateUtils.toString(pair.getKey(),DateUtils.DEFAULT_DATE_TIME_FORMAT) + "____endTime:" + DateUtils.toString(pair.getValue(),DateUtils.DEFAULT_DATE_TIME_FORMAT));}} catch (ParseException e) {e.printStackTrace();}