From ce73093973a55f16195823e369ccdd861b69ea09 Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Wed, 26 Jul 2017 10:17:25 +0800 Subject: [PATCH] use RFC3339 to format default time --- col.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/col.go b/col.go index c18f06b..371af91 100644 --- a/col.go +++ b/col.go @@ -5,6 +5,8 @@ import ( "math" "strconv" + "time" + "github.com/extrame/goyymmdd" ) @@ -58,15 +60,14 @@ func (xf *XfRk) String(wb *WorkBook) string { t := timeFromExcelTime(f, wb.dateMode == 1) return yymmdd.Format(t, formatter.str) } - // see http://www.openoffice.org/sc/excelfileformat.pdf + // see http://www.openoffice.org/sc/excelfileformat.pdf Page #174 } else if 14 <= fNo && fNo <= 17 || fNo == 22 || 27 <= fNo && fNo <= 36 || 50 <= fNo && fNo <= 58 { // jp. date format i, f, isFloat := xf.Rk.number() if !isFloat { f = float64(i) } - fmt.Println(fNo) t := timeFromExcelTime(f, wb.dateMode == 1) - return t.Format("2006.01") //TODO it should be international + return t.Format(time.RFC3339) //TODO it should be international } } return xf.Rk.String()