code: func (c Calendar) formatDateTimeComponentYear(datetime time.Time, length int) (string, error) {
  	year := datetime.Year()
  	switch length {
  	case datetimeFormatLength1Plus:
  		return c.formatDateTimeComponentYearLengthWide(year), nil
  	case datetimeFormatLength2Plus:
  		return c.formatDateTimeComponentYearLength2Plus(year), nil
  	case datetimeFormatLengthWide:
  		return c.formatDateTimeComponentYearLengthWide(year), nil
  	}
  
  	return "", fmt.Errorf("unsupported year length: %d", length)
  }
docs: // formatDateTimeComponentYear renders a year component.