code: func MonthsValid(c *x509.Certificate) int {
  	issued := c.NotBefore
  	expiry := c.NotAfter
  	years := (expiry.Year() - issued.Year())
  	months := years*12 + int(expiry.Month()) - int(issued.Month())
  
  	// Round up if valid for less than a full month
  	if expiry.Day() > issued.Day() {
  		months++
  	}
  	return months
  }
docs: // MonthsValid returns the number of months for which a certificate is valid.