Here you can find the source of sameDay(int firstDate, int secondDate)
public static boolean sameDay(int firstDate, int secondDate)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static boolean sameDay(int firstDate, int secondDate) { Calendar c1 = Calendar.getInstance(); Calendar c2 = Calendar.getInstance(); c1.setTimeInMillis(firstDate * 1000L); c2.setTimeInMillis(secondDate * 1000L); return (c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR)) && (c1.get(Calendar.DAY_OF_YEAR) == c2.get(Calendar.DAY_OF_YEAR)); }//from w w w .j a v a 2 s. c om }