优化代码/删除不需要的代码

This commit is contained in:
刘祥超
2022-10-14 10:03:29 +08:00
parent 5d4da6cccb
commit b0b6b5984f
42 changed files with 554 additions and 1256 deletions

View File

@@ -97,3 +97,27 @@ func TestGroupMinuteRanges(t *testing.T) {
t.Log(minutes)
}
}
func TestLastDayInMonth(t *testing.T) {
t.Log(utils.LastDayInMonth("202209"))
t.Log(utils.LastDayInMonth("202210"))
t.Log(utils.LastDayInMonth("202202"))
}
func TestFixMonthMaxDay(t *testing.T) {
for _, day := range []string{
"20220930",
"20220929",
"20220931",
"20220932",
"20220222",
"20220228",
"20220229",
} {
afterDay, err := utils.FixMonthMaxDay(day)
if err != nil {
t.Fatal(err)
}
t.Log(day, "=>", afterDay)
}
}