🎨 Support database date field relative to today's filtering https://github.com/siyuan-note/siyuan/issues/10451

This commit is contained in:
Daniel 2024-03-01 09:55:21 +08:00
parent a9e4161840
commit 3a5f222e36
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 54 additions and 11 deletions

View file

@ -42,6 +42,8 @@ const (
RelativeDateUnitYear
)
type RelativeDateDirection int
const (
RelativeDateDirectionBefore = -1
RelativeDateDirectionThis = 0
@ -49,9 +51,9 @@ const (
)
type RelativeDate struct {
Count int // 数量
Unit RelativeDateUnit // 单位0 天、1 周、2 月、3 年
Direction int // 方向:-1 前、0 这、1 后
Count int // 数量
Unit RelativeDateUnit // 单位0 天、1 周、2 月、3 年
Direction RelativeDateDirection // 方向:-1 前、0 这、1 后
}
type FilterOperator string