What\'s a good method to, given two Date objects, compare the difference between their time portion only, completely ignoring Year, Month and Day?
It\'s quite the op
Take a look at the Calendar class. It has support for extracting hours, minutes, and seconds from given Date
's.
Calendar calendar = Calendar.getInstance();
calendar.setTime(yourDateObject);
int hour = calendar.get(Calendar.HOUR);
int minute = calendar.get(Calendar.MINUTE);
int second = calendar.get(Calendar.SECOND);