Android Date Interval Get getIntervalDays(String sd, String ed)

Here you can find the source of getIntervalDays(String sd, String ed)

Description

get Interval Days

License

Apache License

Declaration

public static long getIntervalDays(String sd, String ed) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static long getIntervalDays(String sd, String ed) {
        return ((java.sql.Date.valueOf(ed)).getTime() - (java.sql.Date
                .valueOf(sd)).getTime()) / (3600 * 24 * 1000);
    }/*  w  ww.j a  v a 2s . c  o m*/
}

Related

  1. getFragment(Date date, int fragment, int unit)
  2. getFragmentInDays(Date date, int fragment)
  3. getFragmentInHours(Date date, int fragment)
  4. getInterval(String beginMonth, String endMonth)
  5. getIntervalDays(Date minDate, Date maxDate)
  6. getIntervalHours(Date minDate, Date maxDate)
  7. getIntervalMinutes(Date minDate, Date maxDate)
  8. getIntervalYears(Date date1, Date date2)
  9. hoursBetweenDate(Date date1, Date date2)