public static boolean isToday(long when) { Time time = new Time(); time.set(when); int thenYear = time.year; int thenMonth = time.month; int thenMonthDay = time.monthDay; time.set(System.currentTimeMillis()); return (thenYear == time.year) && (thenMonth == time.month) && (thenMonthDay == time.monthDay); }