Explorar el Código

Exported time functions

to use with SetDateTimeWithFormat
tokyis hace 9 años
padre
commit
d5dc146f4e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      cell.go

+ 2 - 2
cell.go

@@ -114,11 +114,11 @@ func (c *Cell) SetFloatWithFormat(n float64, format string) {
 
 var timeLocationUTC, _ = time.LoadLocation("UTC")
 
-func timeToUTCTime(t time.Time) time.Time {
+func TimeToUTCTime(t time.Time) time.Time {
 	return time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond(), timeLocationUTC)
 }
 
-func timeToExcelTime(t time.Time) float64 {
+func TimeToExcelTime(t time.Time) float64 {
 	return float64(t.Unix())/86400.0 + 25569.0
 }