/**
* 判断当前时间是否在某个时间之前
*
* @param tagDateTime
* 判断的标准
* @return true是,false不是
*/
public static boolean belongCalendarBefore(String tagDateTime) {
try {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar contCalendar = Calendar.getInstance();
Calendar tagCalendar = (Calendar) contCalendar.clone();
tagCalendar.setTime(dateFormat.parse(tagDateTime));
return contCalendar.before(tagCalendar);
} catch (ParseException e) {
e.printStackTrace();
}
return false;
}