code: func TimeToExcelTime(t time.Time, date1904 bool) float64 {
  	// Get the number of days since the unix epoc
  	daysSinceUnixEpoc := float64(t.Unix())/secondsInADay
  	// Get the number of nanoseconds in days since Unix() is in seconds.
  	nanosPart := float64(t.Nanosecond())/nanosInADay
  	// Add both together plus the number of days difference between unix and Excel epocs.
  	var offsetDays float64
  	if date1904 {
  		offsetDays = daysBetween1970And1904
  	} else {
  		offsetDays = daysBetween1970And1900
  	}
  	daysSinceExcelEpoc := daysSinceUnixEpoc + offsetDays + nanosPart
  	return daysSinceExcelEpoc
  }
docs: // TimeToExcelTime will convert a time.Time into Excel's float representation, in either 1900 or 1904
  // mode. If you don't know which to use, set date1904 to false.
  // TODO should this should handle Julian dates?