diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2019-05-22 23:46:20 +0200 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2019-05-22 23:46:20 +0200 |
| commit | 06c765d4691dd65b926343e5391f627ac8a9c983 (patch) | |
| tree | 2cbe1107396eef52ad4d2d6b738dc840538f6476 /utils.go | |
| parent | 83410ee498d56f18ccab0abb9c69f112f4d9f008 (diff) | |
interactive analysis
Diffstat (limited to 'utils.go')
| -rw-r--r-- | utils.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -276,6 +276,13 @@ func Round(x, unit float64) float64 { return RetardRound(x/unit) * unit } +// TEst if two time objects happen on same date +func DateEqual(date1, date2 time.Time) bool { + y1, m1, d1 := date1.Date() + y2, m2, d2 := date2.Date() + return y1 == y2 && m1 == m2 && d1 == d2 +} + func cleanString(in string) (out string) { work := strings.Replace(in, "/", "-", -1) work = strings.Replace(work, "*", "-", -1) |
