Here you can find the source of getMinute(Date date1, Date date2)
public static final int getMinute(Date date1, Date date2)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static final int getMinute(Date date1, Date date2) { Long days = date1.getTime() - date2.getTime(); return (int) (days / 1000 / 60); }// w w w . j a va2 s. co m }