Java Date Difference dayDiff(Date date1, Date date2)

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

Description

day Diff

License

Apache License

Declaration

public static long dayDiff(Date date1, Date date2) 

Method Source Code

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

import java.util.*;

public class Main {

    public static long dayDiff(Date date1, Date date2) {
        return (date2.getTime() - date1.getTime()) / 86400000;
    }/*from w w w .  j a v a 2s.  c  o m*/
}

Related

  1. dateDiffInDays(Date dateStart, Date dateEnd)
  2. dateDiffInDaysIgnoreTime(Date dateStart, Date dateEnd)
  3. dateDiffMonth(Date d1, Date d2)
  4. dateDiffWithNow(Calendar sDate)
  5. dayDiff(Date a, Date b)
  6. dayDiff(Date first, Date second)
  7. dayDiffByStartOfDay(Date a, Date b)
  8. daysDiff(Date d1, Date d2)
  9. diff(Date d1, Date d2)