code: private static String day2String(int day) {
          switch (day) {
              case SU:
                  return "SU";
              case MO:
                  return "MO";
              case TU:
                  return "TU";
              case WE:
                  return "WE";
              case TH:
                  return "TH";
              case FR:
                  return "FR";
              case SA:
                  return "SA";
              default:
                  throw new IllegalArgumentException("bad day argument: " + day);
          }
      }
docs: Converts one of the internal day constants (SU, MO, etc.) to the
  two-letter string representing that constant.
  
  @param day one the internal constants SU, MO, etc.
  @return the two-letter string for the day ("SU", "MO", etc.)
  @throws IllegalArgumentException Thrown if the day argument is not one of
  the defined day constants.