u 4 years ago
parent
commit
ff86225e68
  1. 4
      core.go

4
core.go

@ -160,7 +160,7 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool {
start = timeCompletion(start) start = timeCompletion(start)
end = timeCompletion(end) end = timeCompletion(end)
fmt.Println("ssee", start, end, tfdate)
// fmt.Println("ssee", start, end, tfdate)
if start <= tfdate && tfdate < end { if start <= tfdate && tfdate < end {
inTimeOfDayCache.Store(cacheKey, true) inTimeOfDayCache.Store(cacheKey, true)
return true return true
@ -168,8 +168,8 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool {
} }
inTimeOfDayCache.Store(cacheKey, false) inTimeOfDayCache.Store(cacheKey, false)
return false return false
} }
func isInTimeOfDay2(t time.Time, ta TimeArrow) bool { func isInTimeOfDay2(t time.Time, ta TimeArrow) bool {
if len(ta.TimesOnDay) == 0 { if len(ta.TimesOnDay) == 0 {
return true return true

Loading…
Cancel
Save