This commit is contained in:
Daniel 2023-07-26 23:31:14 +08:00
parent dbd09f224b
commit 1276dd8f9a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -192,10 +192,12 @@ func (value *Value) CompareOperator(other *Value, operator FilterOperator) bool
case FilterOperatorIsLessOrEqual:
return value.Date.Content <= other.Date.Content
case FilterOperatorIsBetween:
start := value.Date.Content <= other.Date.Content
end := true
if value.Date.HasEndDate {
// TODO: date filter (between)
end = value.Date.Content2 >= other.Date.Content2
}
return value.Date.Content >= other.Date.Content && value.Date.Content <= other.Date.Content2
return start && end
case FilterOperatorIsEmpty:
return 0 == value.Date.Content
case FilterOperatorIsNotEmpty: