code: func ValidExpiry(c *x509.Certificate) bool {
  	issued := c.NotBefore
  
  	var maxMonths int
  	switch {
  	case issued.After(Apr2015):
  		maxMonths = 39
  	case issued.After(Jul2012):
  		maxMonths = 60
  	case issued.Before(Jul2012):
  		maxMonths = 120
  	}
  
  	if MonthsValid(c) > maxMonths {
  		return false
  	}
  	return true
  }
docs: // ValidExpiry determines if a certificate is valid for an acceptable
  // length of time per the CA/Browser Forum baseline requirements.
  // See https://cabforum.org/wp-content/uploads/CAB-Forum-BR-1.3.0.pdf