code: public static String getDateTimeFormatString(ULocale loc, String calType, int dateStyle,
              int timeStyle) {
          if (timeStyle < DateFormat.NONE || timeStyle > DateFormat.SHORT) {
              throw new IllegalArgumentException("Illegal time style " + timeStyle);
          }
          if (dateStyle < DateFormat.NONE || dateStyle > DateFormat.SHORT) {
              throw new IllegalArgumentException("Illegal date style " + dateStyle);
          }
  
          PatternData patternData = PatternData.make(loc, calType);
  
          // Resolve a pattern for the date/time style
          String pattern = null;
          if ((timeStyle >= 0) && (dateStyle >= 0)) {
              pattern = SimpleFormatterImpl.formatRawPattern(
                      patternData.getDateTimePattern(dateStyle), 2, 2,
                      patternData.patterns[timeStyle],
                      patternData.patterns[dateStyle + 4]);
          } else if (timeStyle >= 0) {
              pattern = patternData.patterns[timeStyle];
          } else if (dateStyle >= 0) {
              pattern = patternData.patterns[dateStyle + 4];
          } else {
              throw new IllegalArgumentException("No date or time style specified");
          }
          return pattern;
      }
docs: TODO: Check if calType can be passed via keyword on loc parameter instead.