code: private DateFormat createParser(Locale loc) throws JspException {
          DateFormat parser = null;
  
          if ((type == null) || DATE.equalsIgnoreCase(type)) {
              parser = DateFormat.getDateInstance(
                      Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
                      loc);
          } else if (TIME.equalsIgnoreCase(type)) {
              parser = DateFormat.getTimeInstance(
                      Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
                      loc);
          } else if (DATETIME.equalsIgnoreCase(type)) {
              parser = DateFormat.getDateTimeInstance(
                      Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
                      Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
                      loc);
          } else {
              throw new JspException(
                      Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
          }
  
          parser.setLenient(false);
  
          return parser;
      }
docs: Private utility methods