Here you can find the source of getDiff(Date from, Date to)
public static long getDiff(Date from, Date to)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static long getDiff(Date from, Date to) { return from.getTime() - to.getTime(); }/*www .ja v a 2 s.com*/ }