Java Calendar Different millisDiff(Calendar c1, Calendar c2)

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

Description

millis Diff

License

Open Source License

Declaration

public static long millisDiff(Calendar c1, Calendar c2) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static long millisDiff(Calendar c1, Calendar c2) {
        long time1 = c1.getTimeInMillis();
        long time2 = c2.getTimeInMillis();
        return Math.abs(time1 - time2);
    }//ww w.  j a  v a 2 s  .  c  o m
}

Related

  1. getTargetDate(Calendar reqCal, int diffMon, int proxyDay)
  2. getTimeDifference(String unit, Calendar start, Calendar end)
  3. getTimeDiffSecond(Calendar first, Calendar second)
  4. getWeekDifference(Calendar before, Calendar after)
  5. getYearDifference(GregorianCalendar fromCalendar, GregorianCalendar toCalendar)
  6. minutesDiff(Calendar c1, Calendar c2)
  7. reduceAndCorrect(Calendar start, Calendar end, int field, int difference)
  8. timeDiff(Calendar c1, Calendar c2)