Android Date Interval Get getIntervalMinutes(Date minDate, Date maxDate)

Here you can find the source of getIntervalMinutes(Date minDate, Date maxDate)

Description

get Interval Minutes

Declaration

public static double getIntervalMinutes(Date minDate, Date maxDate) 

Method Source Code

//package com.java2s;

import java.util.Date;

public class Main {
    public static double getIntervalMinutes(Date minDate, Date maxDate) {
        double days = 0.0;
        if (minDate == null || maxDate == null) {
            return days;
        }//  w ww .  j a  va  2  s . c  o  m
        try {
            long interval = maxDate.getTime() - minDate.getTime();
            days = Double.valueOf(interval) / 1000 / 60;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return days;
    }
}

Related

  1. getFragmentInHours(Date date, int fragment)
  2. getInterval(String beginMonth, String endMonth)
  3. getIntervalDays(Date minDate, Date maxDate)
  4. getIntervalDays(String sd, String ed)
  5. getIntervalHours(Date minDate, Date maxDate)
  6. getIntervalYears(Date date1, Date date2)
  7. hoursBetweenDate(Date date1, Date date2)
  8. millisecondsBetween(Date dt1, Date dt2)
  9. millisecondsBetween(Date dt1, Date dt2)