code: public static Date stringToDate(String dateString) {
          if (!"".equals(dateString) && dateString != null) {
              // ISO_DATE_FORMAT = "yyyyMMdd";
              if (dateString.trim().length() == 8) {
                  return stringToDate(dateString, ISO_DATE_FORMAT, LENIENT_DATE);
              } else if (dateString.trim().length() == 10) {
                  // ISO_EXPANDED_DATE_FORMAT = "yyyy-MM-dd";
                  return stringToDate(dateString, ISO_EXPANDED_DATE_FORMAT,
                          LENIENT_DATE);
              } else if (dateString.trim().length() == 19) {
                  // DATETIME_PATTERN = "yyyy-MM-dd hh:mm:ss";
                  return stringToDate(dateString, DATETIME_PATTERN, LENIENT_DATE);
              } else if (dateString.trim().length() == 11) {
                  // CHINESE_EXPANDED_DATE_FORMAT = "yyyy年MM月dd日";
                  return stringToDate(dateString, CHINESE_EXPANDED_DATE_FORMAT,
                          LENIENT_DATE);
              }
          }
          return null;
      }
docs: 字符串转换为日期java.util.Date
  
  @param dateString
  字符串