File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
lua/orgmode/capture/template Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ function Template:get_datetree_opts()
220
220
--- @diagnostic disable-next-line : param-type-mismatch
221
221
local datetree = vim .deepcopy (self .datetree )
222
222
datetree = (type (datetree ) == ' table' and datetree ) or {}
223
- datetree .date = datetree .date or Date .today ()
223
+ datetree .date = datetree .date or Date .now ()
224
224
datetree .tree_type = datetree .tree_type or ' day'
225
225
return datetree
226
226
end
Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ describe('Capture template', function()
39
39
vim .fn .setreg (' +' , clip_backup )
40
40
end )
41
41
42
- it (' gets current date for datetree enabled with true' , function ()
42
+ it (' gets current date and time for datetree enabled with true' , function ()
43
43
local template = Template :new ({
44
44
template = ' * %?' ,
45
45
datetree = true ,
46
46
})
47
47
48
- assert .are .same (Date .today ():to_string (), template :get_datetree_opts ().date :to_string ())
48
+ assert .are .same (Date .now ():to_string (), template :get_datetree_opts ().date :to_string ())
49
49
end )
50
50
51
51
it (' gets a proper date for datetree enabled as time prompt' , function ()
You can’t perform that action at this time.
0 commit comments