I am developing a J2ME application (CLDC 1.1 and MIDP 2.0) and I was wondering, What is the best way to get the time span between 2 dates?
thanks,
Tal.
Edit:
Here is a little sample using the answer below:
public class TimeHelper {
public static long getTimeSpanInMilliSeconds(Date d1,Date d2) {
return Math.abs(d1.getTime() - d2.getTime());
}
public static double getTimeSpanInMinutes(Date d1,Date d2) {
return getTimeSpanInMilliSeconds(d1, d2) / 60000;
}
}