This commit is contained in:
Daniel 2025-08-21 21:56:11 +08:00
parent e451c1f60a
commit 4210dad5b0
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -680,6 +680,9 @@ func filterTime(valueMills int64, valueIsNotEmpty bool, otherValueMills, otherVa
case FilterOperatorIsLessOrEqual:
return valueTime.Before(otherValueEnd) || valueTime.Equal(otherValueEnd)
case FilterOperatorIsBetween:
if 0 == otherValueMills || 0 == otherValueMills2 {
return true
}
otherValueTime2 := time.UnixMilli(otherValueMills2)
otherValueEnd2 := time.Date(otherValueTime2.Year(), otherValueTime2.Month(), otherValueTime2.Day(), 23, 59, 59, 999999999, otherValueTime2.Location())
return (valueTime.After(otherValueStart) || valueTime.Equal(otherValueStart)) && (valueTime.Before(otherValueEnd2) || valueTime.Equal(otherValueEnd2))