From 856ee57c4019b4478da0f6cb3010ae636914a6be Mon Sep 17 00:00:00 2001 From: xuri Date: Sat, 30 Apr 2022 09:54:11 +0800 Subject: This closes #1212, init support for 1900 or 1904 date system --- date.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'date.go') diff --git a/date.go b/date.go index 83d23cc..1574af7 100644 --- a/date.go +++ b/date.go @@ -36,7 +36,7 @@ func timeToExcelTime(t time.Time) (float64, error) { // TODO in future this should probably also handle date1904 and like TimeFromExcelTime if t.Before(excelMinTime1900) { - return 0.0, nil + return 0, nil } tt := t @@ -58,7 +58,7 @@ func timeToExcelTime(t time.Time) (float64, error) { // program that had the majority market share at the time; Lotus 1-2-3. // https://www.myonlinetraininghub.com/excel-date-and-time if t.After(excelBuggyPeriodStart) { - result += 1.0 + result++ } return result, nil } -- cgit v1.2.1