public static int compare(Date left,Date right){
  return compare(left.getTime() / 1000,right.getTime() / 1000);
}

public static int compare ( Date left , Date right ) { return compare ( left . getTime ( ) / 1000 , right . getTime ( ) / 1000 ) ; }
compares a date with a date
