Here you can find the source of isSameDay(final Calendar cal1, final Calendar cal2)
public static boolean isSameDay(final Calendar cal1, final Calendar cal2)
//package com.java2s; // ProjectForge is dual-licensed. import java.util.Calendar; public class Main { public static boolean isSameDay(final Calendar cal1, final Calendar cal2) { return cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && cal1.get(Calendar.DAY_OF_YEAR) == cal2.get(Calendar.DAY_OF_YEAR); }// www . j a va 2 s.co m }