Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isInSameDay(Calendar calendar1, Calendar calendar2) { return calendar1.get(Calendar.YEAR) == calendar2.get(Calendar.YEAR) && calendar1.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH) && calendar1.get(Calendar.DAY_OF_MONTH) == calendar2.get(Calendar.DAY_OF_MONTH); } }