mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Attribute View date column filter https://github.com/siyuan-note/siyuan/issues/8756
This commit is contained in:
parent
dbd09f224b
commit
1276dd8f9a
1 changed files with 4 additions and 2 deletions
|
|
@ -192,10 +192,12 @@ func (value *Value) CompareOperator(other *Value, operator FilterOperator) bool
|
||||||
case FilterOperatorIsLessOrEqual:
|
case FilterOperatorIsLessOrEqual:
|
||||||
return value.Date.Content <= other.Date.Content
|
return value.Date.Content <= other.Date.Content
|
||||||
case FilterOperatorIsBetween:
|
case FilterOperatorIsBetween:
|
||||||
|
start := value.Date.Content <= other.Date.Content
|
||||||
|
end := true
|
||||||
if value.Date.HasEndDate {
|
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:
|
case FilterOperatorIsEmpty:
|
||||||
return 0 == value.Date.Content
|
return 0 == value.Date.Content
|
||||||
case FilterOperatorIsNotEmpty:
|
case FilterOperatorIsNotEmpty:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue