/** SQL <code>ROUND</code> operator applied to long values. */ public static long sround(long b0) { return sround(b0, 0); }
/** Finds the number of months between two dates, each represented as the * number of days since the epoch. */ public static int subtractMonths(int date0, int date1) { if (date0 < date1) { return -subtractMonths(date1, date0); } // Start with an estimate. // Since no month has more than 31 days, the estimate is <= the true value. int m = (date0 - date1) / 31; for (;;) { int date2 = addMonths(date1, m); if (date2 >= date0) { return m; } int date3 = addMonths(date1, m + 1); if (date3 > date0) { return m; } ++m; } }
public static BigDecimal ceil(BigDecimal b0, int b1) { return ceil(b0, BigDecimal.valueOf(b1)); }
/** SQL <code>FLOOR</code> operator applied to byte values. */ public static byte floor(byte b0, byte b1) { return (byte) floor((int) b0, (int) b1); }
/** SQL <code>TRUNCATE</code> operator applied to BigDecimal values. */ public static BigDecimal struncate(BigDecimal b0) { return struncate(b0, 0); }
/** As {@link #internalToDate(int)} but allows nulls. */ public static java.sql.Date internalToDate(Integer v) { return v == null ? null : internalToDate(v.intValue()); }
/** SQL <code><gt;</code> operator applied to Object values (at least one * operand has ANY type, including String; neither may be null). */ public static boolean neAny(Object b0, Object b1) { return !eqAny(b0, b1); }
public static java.sql.Timestamp internalToTimestamp(Long v) { return v == null ? null : internalToTimestamp(v.longValue()); }
public static java.sql.Time internalToTime(Integer v) { return v == null ? null : internalToTime(v.intValue()); }
++totalFieldCount; return product(enumerators, totalFieldCount, withOrdinality);
/** Adds a given number of months to a timestamp, represented as the number * of milliseconds since the epoch. */ public static long addMonths(long timestamp, int m) { final long millis = DateTimeUtils.floorMod(timestamp, DateTimeUtils.MILLIS_PER_DAY); timestamp -= millis; final long x = addMonths((int) (timestamp / DateTimeUtils.MILLIS_PER_DAY), m); return x * DateTimeUtils.MILLIS_PER_DAY + millis; }
/** SQL <code>CEIL</code> operator applied to short values. */ public static short ceil(short b0, short b1) { return floor((short) (b0 + b1 - 1), b1); }
/** SQL <code>TRUNCATE</code> operator applied to double values. */ public static double struncate(double b0) { return struncate(b0, 0); }
/** As {@link #internalToDate(int)} but allows nulls. */ public static java.sql.Date internalToDate(Integer v) { return v == null ? null : internalToDate(v.intValue()); }
/** SQL <code><gt;</code> operator applied to Object values (at least one * operand has ANY type, including String; neither may be null). */ public static boolean neAny(Object b0, Object b1) { return !eqAny(b0, b1); }
public static java.sql.Timestamp internalToTimestamp(Long v) { return v == null ? null : internalToTimestamp(v.longValue()); }
public static java.sql.Time internalToTime(Integer v) { return v == null ? null : internalToTime(v.intValue()); }
++totalFieldCount; return product(enumerators, totalFieldCount, withOrdinality);
/** Adds a given number of months to a timestamp, represented as the number * of milliseconds since the epoch. */ public static long addMonths(long timestamp, int m) { final long millis = DateTimeUtils.floorMod(timestamp, DateTimeUtils.MILLIS_PER_DAY); timestamp -= millis; final long x = addMonths((int) (timestamp / DateTimeUtils.MILLIS_PER_DAY), m); return x * DateTimeUtils.MILLIS_PER_DAY + millis; }
/** Finds the number of months between two dates, each represented as the * number of days since the epoch. */ public static int subtractMonths(int date0, int date1) { if (date0 < date1) { return -subtractMonths(date1, date0); } // Start with an estimate. // Since no month has more than 31 days, the estimate is <= the true value. int m = (date0 - date1) / 31; for (;;) { int date2 = addMonths(date1, m); if (date2 >= date0) { return m; } int date3 = addMonths(date1, m + 1); if (date3 > date0) { return m; } ++m; } }