mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-03 10:28:46 +00:00
Use readable timestamp for statuses
This commit is contained in:
parent
cb56c459c5
commit
fb20bdc65e
2 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue