compares a Date with a Date

@param left
@param right
@return difference as int
199548
public static int compare(Date left, Date right) {
	return compare(left.getTime() / 1000, right.getTime() / 1000);
    }
89353
public static Number plus(Number left, Number right) {
        return NumberMath.add(left, right);
    }
1362697
public static Boolean ne(Object left, Object right) {
        return not(EvalHelper.isEqual(left, right, null));
    }
34580
private static boolean checkDate(Calendar cal, Calendar other) {
		return checkDate(cal, other.get(Calendar.DATE), other.get(Calendar.MONTH));
	}
1360422
public static boolean areEqual(final String left, final String right)
   {
      if ((left == null) && (right == null))
      {
         return true;
      }
      else if ((left == null) || (right == null))
      {
         return false;
      }
      return left.equals(right);
   }
481656
def value_compare(left, right, ordering=1):
    

    try:
        ltype = left.__class__
        rtype = right.__class__

        if ltype in list_types or rtype in list_types:
            if left == None:
                return ordering
            elif right == None:
                return - ordering

            left = listwrap(left)
            right = listwrap(right)
            for a, b in zip(left, right):
                c = value_compare(a, b) * ordering
                if c != 0:
                    return c

            if len(left) < len(right):
                return - ordering
            elif len(left) > len(right):
                return ordering
            else:
                return 0

        if ltype is float and isnan(left):
            left = None
            ltype = none_type
        if rtype is float and isnan(right):
            right = None
            rtype = none_type

        null_order = ordering*10
        ltype_num = TYPE_ORDER.get(ltype, null_order)
        rtype_num = TYPE_ORDER.get(rtype, null_order)

        type_diff = ltype_num - rtype_num
        if type_diff != 0:
            return ordering if type_diff > 0 else -ordering

        if ltype_num == null_order:
            return 0
        elif ltype is builtin_tuple:
            for a, b in zip(left, right):
                c = value_compare(a, b)
                if c != 0:
                    return c * ordering
            return 0
        elif ltype in data_types:
            for k in sorted(set(left.keys()) | set(right.keys())):
                c = value_compare(left.get(k), right.get(k)) * ordering
                if c != 0:
                    return c
            return 0
        elif left > right:
            return ordering
        elif left < right:
            return -ordering
        else:
            return 0
    except Exception as e:
        Log.error("Can not compare values {{left}} to {{right}}", left=left, right=right, cause=e)
993863
public boolean greaterThan(Object left, Object right) {
    if ((left == right) || left == null || right == null) {
      return false;
    }
    else {
      return compare(left, right, ">") > 0;
    }
  }
58811
public static IsGreaterThan isGreaterThan(ComparableExpression<Number> left, ComparableExpression<Number> right) {
        return new IsGreaterThan(left, right);
    }
1266304
static int compareCalendarDates(@NonNull Calendar first, @NonNull Calendar second) {
        final int firstYear = first.get(Calendar.YEAR);
        final int secondYear = second.get(Calendar.YEAR);
        final int firstDay = first.get(Calendar.DAY_OF_YEAR);
        final int secondDay = second.get(Calendar.DAY_OF_YEAR);
        if(firstYear == secondYear) {
            if(firstDay == secondDay)
                return 0;
            else if(firstDay < secondDay)
                return -1;
            else
                return 1;
        }
        else if(firstYear < secondYear)
            return -1;
        else
            return 1;
    }
344763
private static int compareUnsigned(int left, int right) {
    // NOTE: JDK 7 does not have a built-in operation for this, other than casting to longs.
    //       In JDK 8 it's just Integer.compareUnsigned(left, right).  For now we emulate it
    //       by shifting the sign bit away, with a fallback second compare only if needed.
    int diff = (left >>> 2) - (right >>> 2);
    return diff != 0 ? diff : (left & 3) - (right & 3);
  }
622880
private int compareDate(Date a, Date b) {
		final Date ta = new Date(a.getTime());
		final Date tb = new Date(b.getTime());
		final long d1 = setHourToZero(ta).getTime();
		final long d2 = setHourToZero(tb).getTime();
		return (int) Math.round((d2 - d1) / 1000.0 / 60.0 / 60.0 / 24.0);
	}
99372
public static Expression compare(
      final int comparisonOpcode, final Expression left, final Expression right) {
    checkArgument(
        left.resultType().equals(right.resultType()),
        "left and right must have matching types, found %s and %s",
        left.resultType(),
        right.resultType());
    checkIntComparisonOpcode(left.resultType(), comparisonOpcode);
    Features features =
        Expression.areAllCheap(left, right) ? Features.of(Feature.CHEAP) : Features.of();
    return new Expression(Type.BOOLEAN_TYPE, features) {
      @Override
      protected void doGen(CodeBuilder mv) {
        left.gen(mv);
        right.gen(mv);
        Label ifTrue = mv.newLabel();
        Label end = mv.newLabel();
        mv.ifCmp(left.resultType(), comparisonOpcode, ifTrue);
        mv.pushBoolean(false);
        mv.goTo(end);
        mv.mark(ifTrue);
        mv.pushBoolean(true);
        mv.mark(end);
      }
    };
  }
977440
boolean leftOf(double[] a, double[] b, double[] d) {
    final double bax = b[0] - a[0], bay = b[1] - a[1];
    final double dax = d[0] - a[0], day = d[1] - a[1];
    final double cross = bax * day - bay * dax;
    return cross > 1e-10 * Math.max(Math.max(bax, bay), Math.max(dax, day));
  }
977764
function dateEqual(a, b) {
  if ('date' !== type(b)) return false;
  return sameValue(a.getTime(), b.getTime());
}
1066828
@Pure /* not guaranteed, since compareTo() is invoked */
	@Inline("($1.compareTo($2) > 0)")
	public static <C> boolean operator_greaterThan(Comparable<? super C> left, C right) {
		return left.compareTo(right) > 0;
	}
554587
public static int compareToDDMMYYYY(String date1, String date2) {
		if(date1.length()!=8 || date2.length()!=8) return 0;
		return compareToDDMMYYYY0(date1)-compareToDDMMYYYY0(date2);
	}
637693
def Difference(left: vertex_constructor_param_types, right: vertex_constructor_param_types, label: Optional[str]=None) -> Vertex:
    
    return Double(context.jvm_view().DifferenceVertex, label, cast_to_double_vertex(left), cast_to_double_vertex(right))