code: func ToExtendedString(d time.Duration) string {
  	if d == 0 {
  		return d.String()
  	}
  	var (
  		b          bytes.Buffer
  		dUnixNanos = d.Nanoseconds()
  	)
  	if dUnixNanos < 0 {
  		dUnixNanos = -dUnixNanos
  		b.WriteString("-")
  	}
  	for _, u := range unitsByDurationDesc {
  		// The unit is guaranteed to be valid so it's safe to ignore error here.
  		v, _ := u.Value()
  		valueNanos := int64(v)
  		if dUnixNanos < valueNanos {
  			continue
  		}
  		quotient := dUnixNanos / valueNanos
  		dUnixNanos -= quotient * valueNanos
  		b.WriteString(strconv.Itoa(int(quotient)))
  		b.WriteString(u.String())
  		if dUnixNanos == 0 {
  			break
  		}
  	}
  	return b.String()
  }
docs: // ToExtendedString converts a duration to an extended string.