SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
Date d1=format.parse(FHavetime);
Date nowdate=new Date();
Date d2=format.parse(format.format(nowdate));
DcSiteMessagemodel dcyuyue=dcSiteMessageMng.getByid(3);
DcSiteMessagemodel dcwaimai=dcSiteMessageMng.getByid(4);
long day=(d2.getTime()-d1.getTime())/(24*60*60*1000);
if(day==0){
timeString="今天"+hour+"点"+minute1+"就餐";
}else{
timeString=days+"日"+hour+"点"+minute1+"就餐";
}
转载于:https://www.cnblogs.com/master-zxc/p/4778620.html