MCPcopy Create free account
hub / github.com/devfeel/dottask / IsMatch

Method IsMatch

express.go:39–62  ·  view source on GitHub ↗
(t time.Time)

Source from the content-addressed store, hash-verified

37}
38
39func (e *ExpressSet) IsMatch(t time.Time) bool {
40 switch e.expressType {
41 case ExpressType_WeekDay:
42 _, ok := e.timeMap[int(t.Weekday())]
43 return ok
44 case ExpressType_Month:
45 _, ok := e.timeMap[int(t.Month())]
46 return ok
47 case ExpressType_Day:
48 _, ok := e.timeMap[int(t.Day())]
49 return ok
50 case ExpressType_Hour:
51 _, ok := e.timeMap[int(t.Hour())]
52 return ok
53 case ExpressType_Minute:
54 _, ok := e.timeMap[int(t.Minute())]
55 return ok
56 case ExpressType_Second:
57 _, ok := e.timeMap[int(t.Second())]
58 return ok
59 default:
60 return false
61 }
62}
63
64/*
65parse express

Callers 1

doCronTaskFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected