Here you can find the source of isSameDay(Calendar dayOne, Calendar dayTwo)
public static boolean isSameDay(Calendar dayOne, Calendar dayTwo)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static boolean isSameDay(Calendar dayOne, Calendar dayTwo) { return ((dayOne.get(Calendar.DAY_OF_MONTH) == dayTwo.get(Calendar.DAY_OF_MONTH)) && (dayOne.get(Calendar.MONTH) == dayTwo.get(Calendar.MONTH)) && (dayOne.get(Calendar.YEAR) == dayTwo.get(Calendar.YEAR))); }/*from w w w. j a v a 2 s . co m*/ }