Compare commits
3 commits
b0bccb7e36
...
3c4ca980e4
Author | SHA1 | Date | |
---|---|---|---|
3c4ca980e4 | |||
1a0aec0dd9 | |||
6f1879eeba |
3 changed files with 11 additions and 2 deletions
|
@ -96,7 +96,7 @@ func (a Account) String() string {
|
|||
utilities.Header("ACCOUNT ID:"),
|
||||
a.ID,
|
||||
utilities.Header("JOINED ON:"),
|
||||
a.CreatedAt.Format("02 Jan 2006"),
|
||||
utilities.FormatDate(a.CreatedAt),
|
||||
utilities.Header("STATS:"),
|
||||
a.FollowersCount,
|
||||
a.FollowingCount,
|
||||
|
|
|
@ -186,7 +186,7 @@ func (s Status) String() string {
|
|||
utilities.Header("STATUS ID:"),
|
||||
s.ID,
|
||||
utilities.Header("CREATED AT:"),
|
||||
s.CreatedAt.Format("02 Jan 2006, 03:04"),
|
||||
utilities.FormatTime(s.CreatedAt),
|
||||
utilities.Header("STATS:"),
|
||||
s.RebloggsCount,
|
||||
s.FavouritesCount,
|
||||
|
|
|
@ -2,6 +2,7 @@ package utilities
|
|||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
"unicode"
|
||||
|
||||
"golang.org/x/net/html"
|
||||
|
@ -54,3 +55,11 @@ func WrapLine(line, separator string, charLimit int) string {
|
|||
func Header(text string) string {
|
||||
return boldblue + text + reset
|
||||
}
|
||||
|
||||
func FormatDate(date time.Time) string {
|
||||
return date.Local().Format("02 Jan 2006")
|
||||
}
|
||||
|
||||
func FormatTime(date time.Time) string {
|
||||
return date.Local().Format("02 Jan 2006, 15:04 (MST)")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue