1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

refactor: split utility functions into utils and helpers

This commit is contained in:
Ferdinand Mütsch
2022-12-01 10:57:07 +01:00
parent c5fda02900
commit 21f6809f05
35 changed files with 259 additions and 236 deletions

View File

@ -2,7 +2,6 @@ package utils
import (
"github.com/duke-git/lancet/v2/datetime"
"github.com/muety/wakapi/config"
"github.com/stretchr/testify/assert"
"testing"
"time"
@ -23,8 +22,8 @@ func init() {
}
func TestDate_SplitRangeByDays(t *testing.T) {
df1, _ := time.Parse(config.SimpleDateTimeFormat, "2021-04-25 20:25:00")
dt1, _ := time.Parse(config.SimpleDateTimeFormat, "2021-04-28 06:45:00")
df1, _ := time.Parse("2006-01-02 15:04:05", "2021-04-25 20:25:00")
dt1, _ := time.Parse("2006-01-02 15:04:05", "2021-04-28 06:45:00")
df2 := df1
dt2 := datetime.EndOfDay(df1)
df3 := df1