获取固定时间:年月日
Calendar nowDate = Calendar.getInstance();
String dateString = DateFormatUtils.format(nowDate,DateFormatUtils.ISO_8601_EXTEND_DATE_FORMAT.getPattern());
日期类型比较中:
Date currentDate = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdfDay= new SimpleDateFormat("yyyy-MM-dd");
Date startSaleDayTime = sdf.parse(sdfDay.format(currentDate)+" "+"05:00:00");
Date endSaleDayTime = sdf.parse(sdfDay.format(currentDate)+" "+"23:55:00");
if(currentDate.after(startSaleDayTime) && currentDate.before(startSaleDayTime) ){
return true;
}