public static List<Date> genDateList(Date beginDate,Date endDate){
List<Date> dateList = new ArrayList<Date>();
Calendar start = Calendar.getInstance();
start.setTime(beginDate);
Long startTIme = start.getTimeInMillis();
Calendar end = Calendar.getInstance();
end.setTime(endDate);
Long endTime = end.getTimeInMillis();
Long oneDay = 1000 * 60 * 60 * 24l;
Long time = startTIme;
while (time <= endTime) {
dateList.add(new Date(time));
time += oneDay;
}
return dateList;
}