code: func GetFormatType(format string) (isDuration, isDate bool) {
  	format = skipWhiteSpace(format)
  	var token string
  	var succ bool
  	for {
  		token, format, succ = getFormatToken(format)
  		if len(token) == 0 {
  			break
  		}
  		if !succ {
  			isDuration, isDate = false, false
  			break
  		}
  		var durationTokens bool
  		var dateTokens bool
  		if len(token) >= 2 && token[0] == '%' {
  			switch token[1] {
  			case 'h', 'H', 'i', 'I', 's', 'S', 'k', 'l':
  				durationTokens = true
  			case 'y', 'Y', 'm', 'M', 'c', 'b', 'D', 'd', 'e':
  				dateTokens = true
  			}
  		}
  		if durationTokens {
  			isDuration = true
  		} else if dateTokens {
  			isDate = true
  		}
  		if isDuration && isDate {
  			break
  		}
  	}
  	return
  }
docs: // GetFormatType checks the type(Duration, Date or Datetime) of a format string.