获取两个时间中最小的一个时间

/**
* 获取两个时间中最小的一个时间
*
* @param date
* @param compareDate
* @return
*/
public static Date dateMin(Date date, Date compareDate) {
if (date == null) {
return compareDate;
}
if (compareDate == null) {
return date;
}
if (1 == dateCompare(date, compareDate)) {
return compareDate;
} else if (-1 == dateCompare(date, compareDate)) {
return date;
}
return date;
}
原文地址:https://www.cnblogs.com/gnpugongying/p/15559843.html