String ss = "2019-02-05";
String s = "2019-02-10";
Date a = null;
Date b = null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
a = sdf.parse(s);
b = sdf.parse(ss);
} catch (ParseException e) {
e.printStackTrace();
}
long day = Math.abs(( a.getTime() - b.getTime()) / (24 * 60 * 60 * 1000));
结果5