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()
220220 --- @diagnostic disable-next-line : param-type-mismatch
221221 local datetree = vim .deepcopy (self .datetree )
222222 datetree = (type (datetree ) == ' table' and datetree ) or {}
223- datetree .date = datetree .date or Date .today ()
223+ datetree .date = datetree .date or Date .now ()
224224 datetree .tree_type = datetree .tree_type or ' day'
225225 return datetree
226226end
Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ describe('Capture template', function()
3939 vim .fn .setreg (' +' , clip_backup )
4040 end )
4141
42- it (' gets current date for datetree enabled with true' , function ()
42+ it (' gets current date and time for datetree enabled with true' , function ()
4343 local template = Template :new ({
4444 template = ' * %?' ,
4545 datetree = true ,
4646 })
4747
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 ())
4949 end )
5050
5151 it (' gets a proper date for datetree enabled as time prompt' , function ()
You can’t perform that action at this time.
0 commit comments