Here you can find the source of getMinutesBetweenDates(Date begin_date, Date end_date)
Date
objects.
Parameter | Description |
---|---|
begin_date | a parameter |
end_date | a parameter |
Date
objects in minute
public static int getMinutesBetweenDates(Date begin_date, Date end_date)
//package com.java2s; //License from project: Apache License import java.util.Date; import java.util.concurrent.TimeUnit; public class Main { /**/*from w w w .j a v a 2 s . c om*/ * Calculates duration between two <code>Date</code> objects. * * @param begin_date * @param end_date * @return duration between two <code>Date</code> objects in minute */ public static int getMinutesBetweenDates(Date begin_date, Date end_date) { return (int) TimeUnit.MILLISECONDS.toMinutes(end_date.getTime() - begin_date.getTime()); } }