public static boolean isSameLocalTime(Calendar cal1, Calendar cal2)
	{
		return cal1.get(MILLISECOND) == cal2.get(MILLISECOND)
			&& cal1.get(SECOND) == cal2.get(SECOND)
			&& cal1.get(MINUTE) == cal2.get(MINUTE)
			&& cal1.get(HOUR_OF_DAY) == cal2.get(HOUR_OF_DAY)
			&& cal1.get(DAY_OF_YEAR) == cal2.get(DAY_OF_YEAR)
			&& cal1.get(YEAR) == cal2.get(YEAR)
			&& cal1.get(ERA) == cal2.get(ERA);
	}
public static boolean isSameLocalTime ( Calendar cal1 , Calendar cal2 ) { return cal1 . get ( MILLISECOND ) == cal2 . get ( MILLISECOND ) && cal1 . get ( SECOND ) == cal2 . get ( SECOND ) && cal1 . get ( MINUTE ) == cal2 . get ( MINUTE ) && cal1 . get ( HOUR_OF_DAY ) == cal2 . get ( HOUR_OF_DAY ) && cal1 . get ( DAY_OF_YEAR ) == cal2 . get ( DAY_OF_YEAR ) && cal1 . get ( YEAR ) == cal2 . get ( YEAR ) && cal1 . get ( ERA ) == cal2 . get ( ERA ) ; }
Returns whether the given {@code Calendar}s represent the same local time.

@param cal1 the first {@code Calendar}.
@param cal2 the second {@code Calendar}.

@return whether the given {@code Calendar}s represent the same local time.

@throws NullPointerException if one of the arguments is {@code null}.