summaryrefslogtreecommitdiff
path: root/date.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-04-30 09:54:11 +0800
committerGitHub <noreply@github.com>2022-04-30 09:54:11 +0800
commit856ee57c4019b4478da0f6cb3010ae636914a6be (patch)
treea1a28fb6dec307695d4ec491929a00961c1c65ec /date.go
parent0f93bd23c97ac0f04fe8012bd4a262c851e44a82 (diff)
This closes #1212, init support for 1900 or 1904 date system
Diffstat (limited to 'date.go')
-rw-r--r--date.go4
1 files changed, 2 insertions, 2 deletions
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
}