usps shipdate

来源:互联网 发布:旅游线路图软件 编辑:程序博客网 时间:2024/06/06 20:13

修改DateAdvance参数,格式MM/dd/yyyy,范围0-7

例子如下:

String ShipDate=shipServiceOptions.get("ShipDate");

SimpleDateFormat dd=new SimpleDateFormat("MM/dd/yyyy");
Date eDate=null;
try {
eDate = dd.parse(ShipDate);
Date sDate = new Date();
int d=calInterval(sDate, eDate, "D");
if(d>0 && d<=7){
labelRequest.setDateAdvance(d);
}
} catch (Exception e) {
e.printStackTrace();
}
0 0