public static boolean isSameTime( Date date1, Date date2 )
    {
        Calendar cal1 = Calendar.getInstance();
        cal1.setTime( date1 );
        Calendar cal2 = Calendar.getInstance();
        cal2.setTime( date2 );
        return( ( cal1.get( Calendar.YEAR ) == cal2.get( Calendar.YEAR ) ) &&
                ( cal1.get( Calendar.MONTH ) == cal2.get( Calendar.MONTH ) ) &&
                ( cal1.get( Calendar.DATE ) == cal2.get( Calendar.DATE ) ) &&
                ( cal1.get( Calendar.HOUR_OF_DAY ) == cal2.get( Calendar.HOUR_OF_DAY ) ) &&
                ( cal1.get( Calendar.MINUTE ) == cal2.get( Calendar.MINUTE ) ) );
    }