From adcdbc9ba085e126e309d7dec50fb80e5e2ec3bc Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Sun, 3 Dec 2023 23:00:02 +0300 Subject: Add month abbreviation --- layouts/partials/sections/experience.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'layouts/partials/sections/experience.html') diff --git a/layouts/partials/sections/experience.html b/layouts/partials/sections/experience.html index f813a54..5991c8a 100644 --- a/layouts/partials/sections/experience.html +++ b/layouts/partials/sections/experience.html @@ -6,8 +6,21 @@ {{ .Title }} - {{ with .Params.start_date }}{{ time.Format "Jan 2006" . }}{{ end }} – - {{ with .Params.end_date }}{{ time.Format "Jan 2006" . }}{{ else }}{{ "Present" }}{{ end }} + {{ with .Params.start_date }} + {{ if le ( len (time.Format "January" .)) 4}} + {{ time.Format "January 2006" . }} + {{ else }} + {{ time.Format "Jan. 2006" . }} + {{ end }} + {{ end }} – + {{ with .Params.end_date }} + {{ if le ( len (time.Format "January" .)) 4}} + {{ time.Format "January 2006" . }} + {{ else }} + {{ time.Format "Jan. 2006" . }} + {{ end }} + {{ else }}{{ "Present" }} + {{ end }} -- cgit v1.2.3