private static int cqlDateToDaysSinceEpoch(long raw) {
    if (raw < 0 || raw > MAX_CQL_LONG_VALUE)
      throw new IllegalArgumentException(
          String.format(
              "Numeric literals for DATE must be between 0 and %d (got %d)",
              MAX_CQL_LONG_VALUE, raw));
    return (int) (raw - EPOCH_AS_CQL_LONG);
  }
private static int cqlDateToDaysSinceEpoch ( long raw ) { if ( raw < 0 || raw > MAX_CQL_LONG_VALUE ) throw new IllegalArgumentException ( String . format ( "Numeric literals for DATE must be between 0 and %d (got %d)" , MAX_CQL_LONG_VALUE , raw ) ) ; return ( int ) ( raw - EPOCH_AS_CQL_LONG ) ; }
Converts a raw CQL long representing a numeric DATE literal to the number of days since the
Epoch. In CQL, numeric DATE literals are longs (unsigned integers actually) between 0 and 2^32
- 1, with the epoch in the middle; this method re-centers the epoch at 0.