class PackedLocalDate {

  public static short getYear(int date) {
    // get first two bytes, then convert to a short
    byte byte1 = (byte) (date >> 24);
    byte byte2 = (byte) (date >> 16);
    return (short) ((byte1 << 8) + (byte2 & 0xFF));
  }

}