docs: function toStringDate (str, format) {
    var arr, sIndex, index, rules, len, rest, isDate, tempMatch, zStr
    var dates = []
    if (str) {
      isDate = baseExports.isDate(str)
      if (isDate || /^[0-9]{11,13}$/.test(str)) {
        rest = new Date(isDate ? getDateTime(str) : Number(str))
      } else if (baseExports.isString(str)) {
        format = format || setupDefaults.formatDate
        baseExports.each(dateFormatRules, function (item) {
          for (index = 0, rules = item.rules, len = rules.length; index < len; index++) {
            arr = rules[index]
            sIndex = format.indexOf(arr[0])
            if (sIndex > -1) {
              tempMatch = str.substring(sIndex, sIndex + arr[1]) || 0
              if (item.offset) {
                tempMatch = parseFloat(tempMatch) + item.offset
              }
              dates.push(tempMatch)
              break
            } else if (index === len - 1) {
              dates.push(0)
            }
          }
        })
        zStr = dates[7]
        // 解析时区
        if (zStr) {
          // 如果为UTC 时间
          if (zStr[0] === 'z' || zStr[0] === 'Z') {
            rest = new Date(_utcDateTime(dates))
          } else {
            // 如果指定时区，时区转换
            tempMatch = zStr.match(/([-+]{1})(\d{2}):?(\d{2})/)
            if (tempMatch) {
              rest = new Date(_utcDateTime(dates) - (tempMatch[1] === '-' ? -1 : 1) * parseInt(tempMatch[2]) * 3600000 + parseInt(tempMatch[3]) * 60000)
            }
          }
        } else {
          rest = new Date(dates[0], dates[1], dates[2], dates[3], dates[4], dates[5], dates[6])
        }
      }
    }
    return !rest || isNaN(getDateTime(rest)) ? 'Invalid Date' : rest
  }