Here you can find the source of calMinutes(Date date1, Date date2)
public static int calMinutes(Date date1, Date date2) throws Exception
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static int calMinutes(Date date1, Date date2) throws Exception { int times = 0; times = (int) ((date1.getTime() - date2.getTime()) / (60 * 1000)); return times; }/* w w w . j a v a 2s .c om*/ }