aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-19 18:10:45 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-19 18:10:45 +0200
commit0a7814f33a44a57924ac4c6dfeca20cf741dc1f3 (patch)
tree7e0afa88cf16dbaaab14e97dca8a6365a0300b67 /bug/comment.go
parentd7313068fbb95829175fe108352b7b1e99e6fe9d (diff)
downloadgit-bug-0a7814f33a44a57924ac4c6dfeca20cf741dc1f3.tar.gz
humanize time
Diffstat (limited to 'bug/comment.go')
-rw-r--r--bug/comment.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/bug/comment.go b/bug/comment.go
index 63147776..c0c07076 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -1,6 +1,9 @@
package bug
-import "time"
+import (
+ "github.com/dustin/go-humanize"
+ "time"
+)
type Comment struct {
Author Person
@@ -12,5 +15,6 @@ type Comment struct {
}
func (c Comment) FormatTime() string {
- return time.Unix(c.UnixTime, 0).Format(time.RFC822)
+ t := time.Unix(c.UnixTime, 0)
+ return humanize.Time(t)
}