🎨 Improve database date field relative between filter https://github.com/siyuan-note/siyuan/issues/14217

This commit is contained in:
Daniel 2025-02-27 23:55:42 +08:00
parent 03ed04a639
commit fc82093fbd
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -644,10 +644,10 @@ func filterRelativeTime(valueMills int64, valueIsNotEmpty bool, operator FilterO
((valueTime.After(otherValueStart2) || valueTime.Equal(otherValueStart2)) && (valueTime.Before(otherValueEnd2) || valueTime.Equal(otherValueEnd2)))
} else if RelativeDateDirectionAfter == direction2 {
var leftStart, rightEnd time.Time
if otherValueEnd.Before(otherValueEnd2) {
leftStart = otherValueEnd
if otherValueStart.Before(otherValueStart2) {
leftStart = otherValueStart
} else {
leftStart = otherValueEnd2
leftStart = otherValueStart2
}
if otherValueEnd.After(otherValueEnd2) {
rightEnd = otherValueEnd