summaryrefslogtreecommitdiffstats
path: root/tjp.go
diff options
context:
space:
mode:
Diffstat (limited to 'tjp.go')
-rw-r--r--tjp.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/tjp.go b/tjp.go
index ba9c3b0..b192189 100644
--- a/tjp.go
+++ b/tjp.go
@@ -117,12 +117,16 @@ func formatVertically(id sql.NullInt64, dateAdded sql.NullTime, entry sql.NullSt
}
func formatHorizontally(dateAdded sql.NullTime, entry sql.NullString, comment sql.NullString) {
- fmt.Printf("%s | %s | %s\n", formatShortTime(dateAdded), formatString(entry), formatString(comment))
+ fmt.Printf("%s %s | %s | %s\n", formatShortTime(dateAdded), getWeekdayFromDate(dateAdded), formatString(entry), formatString(comment))
+}
+
+func getWeekdayFromDate(date sql.NullTime) string {
+ return date.Time.Format("Monday")
}
func formatShortTime(t sql.NullTime) string {
if t.Valid {
- return t.Time.Format("2006-01-02T15:04")
+ return t.Time.Format("2006-01-02 15:04")
}
return "NULL"
}