调通听接口,未测试
This commit is contained in:
@@ -1714,6 +1714,29 @@ public final class TimeUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 比较时间大小
|
||||
*
|
||||
* @param compareDate
|
||||
* @return
|
||||
*/
|
||||
public static boolean compareDate( String compareDate, DateFormat format) {
|
||||
DateFormat df = format;
|
||||
try {
|
||||
Date now = df.parse(getNowString(format)) ;
|
||||
Date compare = df.parse(compareDate);
|
||||
if (now.after(compare)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 比较时间大小
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user