X-Git-Url: https://git.r.bdr.sh/rbdr/nota.nvim/blobdiff_plain/503d09fc95a47c13141d097cf80dd243d1dce342..9e9e89d8556ecafa6b11ab21aa9ffab550f7f3ad:/lua/notes.lua diff --git a/lua/notes.lua b/lua/notes.lua index 008baac..b23d6df 100644 --- a/lua/notes.lua +++ b/lua/notes.lua @@ -36,8 +36,11 @@ end ------------------------------------------------------------------------------- --- Opens the daily note -function Notes.open_daily() - local filename = os.date('%Y-%m-%d') .. '.md' +function Notes.open_daily(date) + if not date or date == '' then + date = os.date('%Y-%m-%d') + end + local filename = date .. '.md' open_periodic_note('daily', filename) end