Humanize message list dates
This commit is contained in:
parent
6ecb243620
commit
2611bee170
2 changed files with 3 additions and 1 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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}}">
|
||||
|
|
Loading…
Reference in a new issue