Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Date; public class Main { public static long getDays(Date start, Date end) { return (end.getTime() - start.getTime()) / (24 * 60 * 60 * 1000); } }