Browse Source

Exported time functions

to use with SetDateTimeWithFormat
tokyis 9 years ago
parent
commit
d5dc146f4e
1 changed files with 2 additions and 2 deletions
  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
 }