class PackedLocalDate {

  public static int lengthOfMonth(int packedDate) {
    switch (getMonthValue(packedDate)) {
      case 2:
        return (isLeapYear(packedDate) ? 29 : 28);
      case 4:
      case 6:
      case 9:
      case 11:
        return 30;
      default:
        return 31;
    }
  }

}