diff options
author | Robin Jarry <robin@jarry.cc> | 2023-02-03 00:03:43 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-02-20 14:48:42 +0100 |
commit | 70f99085d73b3bfc9b3338c52e6df7bebc7651c7 (patch) | |
tree | 40918277a9e09c28c9492b0837a992e2d3824080 /lib/templates | |
parent | 24f91b0277a1034f731aaf00c3e1f894c5ad27c1 (diff) | |
download | aerc-70f99085d73b3bfc9b3338c52e6df7bebc7651c7.tar.gz |
templates: add now function
This allows to get the current local time.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'lib/templates')
-rw-r--r-- | lib/templates/functions.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/templates/functions.go b/lib/templates/functions.go index 5d2f1928..0b0a4546 100644 --- a/lib/templates/functions.go +++ b/lib/templates/functions.go @@ -250,6 +250,7 @@ var templateFuncs = template.FuncMap{ "quote": quote, "wrapText": wrapText, "wrap": wrap, + "now": time.Now, "dateFormat": time.Time.Format, "toLocal": toLocal, "exec": cmd, |