/**
* 判断时间是不是今天
* @param date
* @return
*/
public static boolean isToday(Date date){
Date now = new Date();
SimpleDateFormat sim = new SimpleDateFormat("yyyyMMdd");
String nowDay = sim.format(now);
String day = sim.format(date);
return day.equals(nowDay);
}
网友评论