diff options
author | r <r@freesoftwareextremist.com> | 2020-01-10 04:05:01 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-01-10 04:18:33 +0000 |
commit | fb20bdc65e32dbe56f3e8d6eefdc611872dffd84 (patch) | |
tree | 0011f34dc11457f973733a796d6e3d1ba92d3a0a /renderer | |
parent | cb56c459c53ec31fb1d73b56a485b96dbf9e1013 (diff) | |
download | bloat-fb20bdc65e32dbe56f3e8d6eefdc611872dffd84.tar.gz bloat-fb20bdc65e32dbe56f3e8d6eefdc611872dffd84.zip |
Use readable timestamp for statuses
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/renderer.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/renderer/renderer.go b/renderer/renderer.go index efc412d..4065312 100644 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -41,6 +41,7 @@ func NewRenderer(templateGlobPattern string) (r *renderer, err error) { "DisplayInteractionCount": DisplayInteractionCount, "TimeSince": TimeSince, "FormatTimeRFC3339": FormatTimeRFC3339, + "FormatTimeRFC822": FormatTimeRFC822, }).ParseGlob(templateGlobPattern) if err != nil { return @@ -175,3 +176,7 @@ func TimeSince(t time.Time) string { func FormatTimeRFC3339(t time.Time) string { return t.Format(time.RFC3339) } + +func FormatTimeRFC822(t time.Time) string { + return t.Format(time.RFC822) +} |