Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isTaday(Long time) { Calendar calendar_cur = Calendar.getInstance(); Calendar calendar_old = Calendar.getInstance(); calendar_old.setTimeInMillis(time); int day_cur = calendar_cur.get(Calendar.DAY_OF_YEAR); int day_old = calendar_old.get(Calendar.DAY_OF_YEAR); if (day_cur == day_old) { return true; } else { return false; } } }