aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-15 20:30:31 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-15 20:30:31 +0200
commitbfb5e96aab9e78f05942151060cc92fdaa32bedd (patch)
treeddac4640aa1b43e13dc466cad6bbaed49f172fd9 /bug/comment.go
parent6b732d4535fc31e37485c7b496f2bbe0c854f661 (diff)
downloadgit-bug-bfb5e96aab9e78f05942151060cc92fdaa32bedd.tar.gz
commands: git bug comment now show the comments of a bug
Diffstat (limited to 'bug/comment.go')
-rw-r--r--bug/comment.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/bug/comment.go b/bug/comment.go
index 72eed1a0..c7168275 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -17,8 +17,13 @@ type Comment struct {
UnixTime int64
}
-// FormatTime format the UnixTime of the comment for human consumption
-func (c Comment) FormatTime() string {
+// FormatTimeRel format the UnixTime of the comment for human consumption
+func (c Comment) FormatTimeRel() string {
t := time.Unix(c.UnixTime, 0)
return humanize.Time(t)
}
+
+func (c Comment) FormatTime() string {
+ t := time.Unix(c.UnixTime, 0)
+ return t.Format("Mon Jan 2 15:04:05 2006 +0200")
+}