//年不相等
if(!year.equals(year2))
year = year2;
//月份不等
if(!isNumeric(month) || !month.equals(month2) && Integer.valueOf(month)>Integer.valueOf(month2))
month = month2;
//天数小于当天
if(!isNumeric(day) || Integer.valueOf(day)<Integer.valueOf(day2))
day=String.valueOf(Integer.valueOf(day2)+1);
//时间超过24小时
if(!isNumeric(hours) || !isNumeric(hours) || Integer.valueOf(hours)>24)
hours = hours2;
c.set(Calendar.MONTH,c.get(Calendar.MONTH)+1);
c.set(Calendar.DAY_OF_MONTH,1);
c.set(Calendar.DATE,c.get(Calendar.DATE)-1);
//时间是数字,并且天数不要超过当月天数
if(Integer.valueOf(day)>c.get(Calendar.DAY_OF_MONTH))
day = String.valueOf(Integer.valueOf(day2)+1);
if(Integer.valueOf(hours)>24)
hours = hours2;
return year+"-"+month+"-"+day+" "+hours+":00:00";
}