Here you can find the source of minutesBetween(Date date1, Date date2)
public static long minutesBetween(Date date1, Date date2)
//package com.java2s; //License from project: Apache License import java.util.Date; import java.util.concurrent.TimeUnit; public class Main { public static long minutesBetween(Date date1, Date date2) { long diffInMillies = date2.getTime() - date1.getTime(); return TimeUnit.MINUTES.convert(diffInMillies, TimeUnit.MILLISECONDS); }//from w ww. j a v a 2s. c o m }