diff options
-rw-r--r-- | plugins/base/template.go | 2 | ||||
-rw-r--r-- | themes/alps/mailbox.html | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/base/template.go b/plugins/base/template.go index 7d85db6..7d6e126 100644 --- a/plugins/base/template.go +++ b/plugins/base/template.go @@ -6,6 +6,7 @@ import ( "strings" "time" + "github.com/dustin/go-humanize" "github.com/emersion/go-imap" ) @@ -61,4 +62,5 @@ var templateFuncs = template.FuncMap{ } return t.Format(inputTimeLayout) }, + "humantime": humanize.Time, } diff --git a/themes/alps/mailbox.html b/themes/alps/mailbox.html index 60cc978..ac09a7d 100644 --- a/themes/alps/mailbox.html +++ b/themes/alps/mailbox.html @@ -68,7 +68,7 @@ </a> </div> <div class="message-list-date {{$classes}}"> - {{ .Envelope.Date | formatdate }} + {{ .Envelope.Date | humantime }} </div> {{ else }} <div class="message-list-checkbox {{$classes}}"> |