//计算天数
public List day(String dates,String datee) throws ParseException{
List dayls=new ArrayList();
// 字符串转换成日期
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date startDate = format.parse(dates);
Calendar startTime = Calendar.getInstance();
startTime.clear();
startTime.setTime(startDate);
int startYear = startTime.get(Calendar.YEAR);
int startMonth = startTime.get(Calendar.MONTH);
int startDay = startTime.get(Calendar.DAY_OF_MONTH);
Date endDate = format.parse(datee);
Calendar endTime = Calendar.getInstance();
endTime.clear();
endTime.setTime(endDate);
int endYear = endTime.get(Calendar.YEAR);
int endMonth = endTime.get(Calendar.MONTH);
int endDay = endTime.get(Calendar.DAY_OF_MONTH);
int count = 0;
for (int x = startYear; x <= endYear; x++) {
// 罗马历法产生年份公元1582年
int gregorianCutoverYear = 1582;
// 判断是否是闰年
boolean isLeapYear = x >= gregorianCutoverYear ? ((x % 4 == 0) && ((x % 100 != 0) || (x % 400 == 0)))
: (x % 4 == 0);
// 获取开始月的最大天数;大月是1,3,5,7,8,10,12;小月是4,6,9,11;特殊月是2
int max = 0;
if (startMonth == 1) {
if (isLeapYear) {
max = 29;
}
if (!isLeapYear) {
max = 28;
}
}
if (startMonth == 3 || startMonth == 5 || startMonth == 8
|| startMonth == 10) {
max = 30;
}
if (startMo