code: public static int getQuarter(int packedDate) {
          if (packedDate == DateColumnType.missingValueIndicator()) {
              return -1;
          }
          Month month = getMonth(packedDate);
          switch (month) {
              case JANUARY:
              case FEBRUARY:
              case MARCH:
                  return 1;
              case APRIL:
              case MAY:
              case JUNE:
                  return 2;
              case JULY:
              case AUGUST:
              case SEPTEMBER:
                  return 3;
              case OCTOBER:
              case NOVEMBER:
              default:  // must be december
                  return 4;
          }
      }
docs: Returns the quarter of the year of the given date as an int from 1 to 4, or -1, if the argument is the
  MISSING_VALUE for DateColumn