Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isSameDay(Calendar day1, Calendar day2) { return day1.get(Calendar.YEAR) == day2.get(Calendar.YEAR) && day1.get(Calendar.DAY_OF_YEAR) == day2.get(Calendar.DAY_OF_YEAR); } }