public static long getDateQuot(String time1, String time2) {
        long quot = 0;
        SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd");
        try {
            Date date1 = ft.parse(time1);
            Date date2 = ft.parse(time2);
            quot = date2.getTime() - date1.getTime();
            quot = quot / 1000 / 60 / 60 / 24;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return quot;
    }
public static long getDateQuot ( String time1 , String time2 ) { long quot = 0 ; SimpleDateFormat ft = new SimpleDateFormat ( "yyyy-MM-dd" ) ; try { Date date1 = ft . parse ( time1 ) ; Date date2 = ft . parse ( time2 ) ; quot = date2 . getTime ( ) - date1 . getTime ( ) ; quot = quot / 1000 / 60 / 60 / 24 ; } catch ( ParseException e ) { e . printStackTrace ( ) ; } return quot ; }
两个日期之间的天数

@param time1
@param time2
@return