aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/datetimestamps.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/datetimestamps.lua b/plugins/datetimestamps.lua
index ecb91c2..e755848 100644
--- a/plugins/datetimestamps.lua
+++ b/plugins/datetimestamps.lua
@@ -1,9 +1,14 @@
local core = require "core"
+local config = require "core.config"
local command = require "core.command"
+config.datetimestamps_format_datestamp = "%Y%m%d"
+config.datetimestamps_format_datetimestamp = "%Y%m%d_%H%M%S"
+config.datetimestamps_format_timestamp = "%H%M%S"
+
local function datestamp()
- local sOut = os.date('%Y%m%d')
+ local sOut = os.date(config.datetimestamps_format_datestamp)
core.active_view.doc:text_input(sOut)
@@ -11,7 +16,7 @@ end
local function datetimestamp()
- local sOut = os.date('%Y%m%d_%H%M%S')
+ local sOut = os.date(config.datetimestamps_format_datetimestamp)
core.active_view.doc:text_input(sOut)
@@ -19,7 +24,7 @@ end
local function timestamp()
- local sOut = os.date('%H%M%S')
+ local sOut = os.date(config.datetimestamps_format_timestamp)
core.active_view.doc:text_input(sOut)