Here you can find the source of getIntervalDays(String sd, String ed)
public static long getIntervalDays(String sd, String ed)
//package com.java2s; //License from project: Apache License 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); }/* w ww.j a v a 2s . c o m*/ }