From f1cd786cd745c6fa2a419648af968e9a66937ffb Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 31 Oct 2021 13:27:38 +0100 Subject: Pretty print the creation and expiration dates --- src/database.nim | 1 - src/templates/short.html | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/database.nim b/src/database.nim index a696d12..004d7c4 100644 --- a/src/database.nim +++ b/src/database.nim @@ -1,7 +1,6 @@ import std / [options, times] import tiny_sqlite -import nanoid import dbUtils diff --git a/src/templates/short.html b/src/templates/short.html index 1f36fdf..fac811c 100644 --- a/src/templates/short.html +++ b/src/templates/short.html @@ -3,7 +3,9 @@
-Created on : {{ $req.Created }}
-Expires on : {{ $req.Expires }}
+{% let created = req.Created.format("yyyy-MM-dd") %}
+{% let expires = req.Expires.format("yyyy-MM-dd") %}
+Created on : {{ $created }}
+Expires on : {{ $expires }}