Java Calendar Different getDateDiff(Calendar c1, Calendar c2)

Here you can find the source of getDateDiff(Calendar c1, Calendar c2)

Description

get Date Diff

License

LGPL

Declaration

public static int getDateDiff(Calendar c1, Calendar c2) 

Method Source Code

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

import java.util.Calendar;

public class Main {
    public static int getDateDiff(Calendar c1, Calendar c2) {
        return (int) ((c2.getTimeInMillis() - c1.getTimeInMillis()) / (1000 * 60 * 60 * 24));
    }/*from w  w  w  .  j  av  a2 s . co m*/
}

Related

  1. diff(Calendar value1, Calendar value2, int millisInCondition)
  2. diffDay(Calendar calendar, int day)
  3. diffDays(Calendar startDate, Calendar endDate)
  4. differenceInDays(Calendar date1, Calendar date2)
  5. formatTimeDiff(Calendar ref, Calendar now, boolean ignoreMS)
  6. getDateDiff(Calendar d1, Calendar d2)
  7. getDateDiff(Date d1, Date d2, int gregorianCalendarUnits)
  8. getDaysDifference(Calendar refDate, Date date)
  9. getDifference(int constant, Calendar first, Calendar second)