Here you can find the source of isDateDayEqual(long lTime1, long lTime2)
public static boolean isDateDayEqual(long lTime1, long lTime2)
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isDateDayEqual(long lTime1, long lTime2) { Calendar cal1 = Calendar.getInstance(); cal1.setTimeInMillis(lTime1);//ww w . j a v a 2 s . co m Calendar cal2 = Calendar.getInstance(); cal2.setTimeInMillis(lTime2); return cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && cal1.get(Calendar.DAY_OF_YEAR) == cal2 .get(Calendar.DAY_OF_YEAR); } }