Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static boolean isToday(long date) { Calendar compareCalendar = Calendar.getInstance(); compareCalendar.setTime(new Date(date)); Calendar todayCalendar = Calendar.getInstance(); todayCalendar.setTime(new Date(System.currentTimeMillis())); return todayCalendar.get(Calendar.DATE) == compareCalendar.get(Calendar.DATE); } }