docs: private static int parseField(String field, Input s, Character delim, int minLen, int maxLen, boolean strict) {
      int startIndex = s.index;
      int result = parseInt(s);
      if (startIndex == s.index) throw new DateFormatException("missing value for field '" + field + "'", s.str, startIndex);
      if (strict) {
        int len = s.index - startIndex;
        if (len < minLen) throw new DateFormatException("field '" + field + "' must be at least " + minLen + " digits wide", s.str, startIndex);
        if (maxLen > 0 && len > maxLen) throw new DateFormatException("field '" + field + "' must be no more than " + minLen + " digits wide", s.str, startIndex);
      }
      if (delim != null) {
        if (s.index >= s.len) throw new DateFormatException("unexpected end of input", s.str, s.index);
        if (strict && s.getChar() != delim.charValue()) throw new DateFormatException("unexpected character, expected '" + delim + "'", s.str, s.index);
        s.index++;
      }
      return result;
    }