Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Date; public class Main { public static int get_between_days(Date date1, Date date2) { return (int) ((date1.getTime() - date2.getTime()) / (24 * 60 * 60 * 1000)); } }