Here you can find the source of dateDifferenceInMin(Calendar startDate, Calendar stopDate)
Parameter | Description |
---|---|
startDate | a parameter |
stopDate | a parameter |
public static String dateDifferenceInMin(Calendar startDate, Calendar stopDate)
//package com.java2s; import java.util.Calendar; public class Main { /**//from w ww . jav a 2 s. c om * This method return the min as string between two dates. * @param startDate * @param stopDate * @return */ public static String dateDifferenceInMin(Calendar startDate, Calendar stopDate) { return "" + ((stopDate.getTimeInMillis() - startDate.getTimeInMillis())) / (1000 * 60); } }