Here you can find the source of minutesDiff(Calendar c1, Calendar c2)
public static double minutesDiff(Calendar c1, Calendar c2)
//package com.java2s; import java.util.Calendar; public class Main { public static double minutesDiff(Calendar c1, Calendar c2) { return secondsDiff(c1, c2) / 60.0; }//from w w w . java2 s . co m public static double secondsDiff(Calendar c1, Calendar c2) { return millisDiff(c1, c2) / 1000.0; } public static long millisDiff(Calendar c1, Calendar c2) { long time1 = c1.getTimeInMillis(); long time2 = c2.getTimeInMillis(); return Math.abs(time1 - time2); } }