Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isInSameDay(Calendar cl1, Calendar cl2) { if (cl1.get(Calendar.DAY_OF_YEAR) == cl2.get(Calendar.DAY_OF_YEAR) && cl1.get(Calendar.YEAR) == cl2.get(Calendar.YEAR)) { return true; } return false; } }