Here you can find the source of dateEquals(Calendar calendarFirst, Calendar calendarSecond)
public static Boolean dateEquals(Calendar calendarFirst, Calendar calendarSecond)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static Boolean dateEquals(Calendar calendarFirst, Calendar calendarSecond) { if (calendarFirst.get(Calendar.YEAR) == calendarSecond.get(Calendar.YEAR)) if (calendarFirst.get(Calendar.MONTH) == calendarSecond.get(Calendar.MONTH)) if (calendarFirst.get(Calendar.DAY_OF_MONTH) == calendarSecond.get(Calendar.DAY_OF_MONTH)) return true; return false; }/*from w w w . j a v a2 s . c o m*/ }