public static long getMinutesDifference ( Date startDate , Date endDate ) { long startTime = startDate . getTime ( ) ; long endTime = endDate . getTime ( ) ; long diffTime = endTime - startTime ; long diffInMinutes = TimeUnit . MILLISECONDS . toMinutes ( diffTime ) ; return diffInMinutes ; }
Gets the minutes difference .