code: func strToDate(t *mysqlTime, date string, format string, ctx map[string]int) bool {
  	date = skipWhiteSpace(date)
  	format = skipWhiteSpace(format)
  
  	token, formatRemain, succ := getFormatToken(format)
  	if !succ {
  		return false
  	}
  
  	if token == "" {
  		// Extra characters at the end of date are ignored.
  		return true
  	}
  
  	dateRemain, succ := matchDateWithToken(t, date, token, ctx)
  	if !succ {
  		return false
  	}
  
  	return strToDate(t, dateRemain, formatRemain, ctx)
  }
docs: // strToDate converts date string according to format, returns true on success,
  // the value will be stored in argument t or ctx.