feat: timer 包新增部分获取 分、日、月、年 开始结束时间函数,以及快捷创建时间窗口时间段的函数

This commit is contained in:
kercylan98
2023-09-23 11:25:46 +08:00
parent fb7839d3e6
commit 05f0016b7e
3 changed files with 74 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package times_test
import (
"fmt"
"github.com/kercylan98/minotaur/utils/times"
"testing"
"time"
)
func TestNewPeriodWindow(t *testing.T) {
cur := time.Now()
fmt.Println(cur)
window := times.NewPeriodWindow(cur, times.Day)
fmt.Println(window)
}