From 83068e469c617a136bde71051799f5c6a7e4128d Mon Sep 17 00:00:00 2001 From: public_host Date: Mon, 6 Jan 2025 14:59:59 +0800 Subject: [PATCH] update --- core.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core.go b/core.go index 99a1f18..1445dae 100644 --- a/core.go +++ b/core.go @@ -503,36 +503,48 @@ func (th *TimeArrowHelper) GetHitTimeArrow(t time.Time, group string, expandTags case TimeArrowTypeDayOfWeek: //一周中某一天是否判定 if isInWeekOfDay(t, ta[e]) { + log.Println("命中DayOfWeek:", ta[e].Type, ta[e].TimeArrowId) + log.Println("for循环耗时:", time.Since(forStart)) return &ta[e], nil } break case TimeArrowTypeDayOfMonth: //一月中某一天是否判定 if isInDayOfMonth(t, ta[e]) { + log.Println("命中DayOfMonth:", ta[e].Type, ta[e].TimeArrowId) + log.Println("for循环耗时:", time.Since(forStart)) return &ta[e], nil } break case TimeArrowTypeDateSlice: //一月中某一天是否判定 if isInDateSlice(t, ta[e]) { + log.Println("命中DateSlice:", ta[e].Type, ta[e].TimeArrowId) + log.Println("for循环耗时:", time.Since(forStart)) return &ta[e], nil } break case TimeArrowTypeAtLastDayHolidays: //节假日最后一天 if isInAtLastDayHolidays(t) { + log.Println("命中AtLastDayHolidays:", ta[e].Type, ta[e].TimeArrowId) + log.Println("for循环耗时:", time.Since(forStart)) return &ta[e], nil } break case TimeArrowTypePriorToDayHolidays: //节假日前一天 if isInPriorToDayHolidays(t) { + log.Println("命中PriorToDayHolidays:", ta[e].Type, ta[e].TimeArrowId) + log.Println("for循环耗时:", time.Since(forStart)) return &ta[e], nil } break case TimeArrowTypeInHolidays: //节假日 if isInHolidays(t) { + log.Println("命中InHolidays:", ta[e].Type, ta[e].TimeArrowId) + log.Println("for循环耗时:", time.Since(forStart)) return &ta[e], nil } break