public static int truncatedCompareTo(final Calendar cal1,final Calendar cal2,final int field){
  final Calendar truncatedCal1=truncate(cal1,field);
  final Calendar truncatedCal2=truncate(cal2,field);
  return truncatedCal1.compareTo(truncatedCal2);
}

public static int truncatedCompareTo ( final Calendar cal1 , final Calendar cal2 , final int field ) { final Calendar truncatedCal1 = truncate ( cal1 , field ) ; final Calendar truncatedCal2 = truncate ( cal2 , field ) ; return truncatedCal1 . compareTo ( truncatedCal2 ) ; }
determines how two calendars compare up to no more than the specified most significant field .
