Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isSameDate(Calendar calendar1, Calendar calendar2) { if (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)) { return true; } else { return false; } } }