Here you can find the source of getIntervalDays(String sd, String ed)
public static long getIntervalDays(String sd, String ed)
//package com.java2s; public class Main { public static long getIntervalDays(String sd, String ed) { return ((java.sql.Date.valueOf(ed)).getTime() - (java.sql.Date .valueOf(sd)).getTime()) / (3600 * 24 * 1000); }/* www . j av a2 s.co m*/ }