Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isSameTime(Calendar startTime, Calendar endTime) { if (startTime.get(Calendar.HOUR) == endTime.get(Calendar.HOUR) && startTime.get(Calendar.MINUTE) == endTime.get(Calendar.MINUTE)) return true; else return false; } }