Skip to content

Commit c889000

Browse files
fix(filters): Use start of day for dates in match filter
1 parent b56ece9 commit c889000

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/orgmode/files/elements/search.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,14 +396,14 @@ function PropertyMatch:parse(input)
396396
---@type string?, OrgDate?
397397
local date_content, date_value
398398
if date_str == '<today>' then
399-
date_value = Date.today()
399+
date_value = Date.today():start_of('day')
400400
elseif date_str == '<tomorrow>' then
401-
date_value = Date.tomorrow()
401+
date_value = Date.tomorrow():start_of('day')
402402
else
403403
-- Parse relative formats (e.g. <+1d>) as well as absolute
404404
date_content = date_str:match('^<([%+%-]%d+[dmyhwM])>$')
405405
if date_content then
406-
date_value = Date.today()
406+
date_value = Date.today():start_of('day')
407407
date_value = date_value:adjust(date_content)
408408
else
409409
date_content = date_str:match('^<([^>]+)>$')

0 commit comments

Comments
 (0)