Android Date Interval Get daysBetweenDate(Date date1, Date date2)

Here you can find the source of daysBetweenDate(Date date1, Date date2)

Description

days Between Date

Declaration

public static long daysBetweenDate(Date date1, Date date2) 

Method Source Code

//package com.java2s;

import java.util.Date;

public class Main {
    public static long daysBetweenDate(Date date1, Date date2) {
        long d = date1.getTime() - date2.getTime();
        return d / 86400000;
    }/*from  w w w.j  a va2  s  . c  o m*/
}

Related

  1. calculateDiffInMinutes(Date date1, Date date2)
  2. dateDiff(String startTime, String endTime)
  3. dateDiff(String startTime, String endTime, String format, String str)
  4. dayDiff(Date date1, Date date2)
  5. dayOffset(Date date, int offset)
  6. getDiff(String startTime, String endTime)
  7. getDiff(String startTime, String endTime)
  8. getDiffDays(String startDate, String endDate)
  9. getDiffDays(String startDate, String endDate)