diff --git a/cmd/forecast.go b/cmd/forecast.go index f268578..27d79ad 100644 --- a/cmd/forecast.go +++ b/cmd/forecast.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "os" - "time" "git.sr.ht/~timharek/yr/cmd/flags" "git.sr.ht/~timharek/yr/cmd/internal/ui/table" @@ -83,7 +82,7 @@ func forecast(cmd *cobra.Command, args []string) { itemTime = item.Time } t.Row( - itemTime.Format(time.DateTime), + itemTime.Format("Mon, 2 Jan 15:04"), fmt.Sprintf("%.1f °C", item.Temperature), fmt.Sprintf("%.1f mm", item.Percipitation), fmt.Sprintf("%.1f m/s %s", item.Wind.Speed, item.Wind.DirectionToString()), diff --git a/cmd/now.go b/cmd/now.go index 9cbb298..bbe0caf 100644 --- a/cmd/now.go +++ b/cmd/now.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "os" - "time" "git.sr.ht/~timharek/yr/cmd/flags" "git.sr.ht/~timharek/yr/internal/nominatim" @@ -77,14 +76,13 @@ func now(cmd *cobra.Command, args []string) { itemTime = n.Time } fmt.Printf( - `%s now: - %s + `%s %s: Temperature: %.1f °C Rain: %.1f mm Wind: %.1f m/s from %s `, n.Location, - itemTime.Format(time.DateTime), + itemTime.Format("Monday 2 Jan 15:04"), n.Temperature, n.Percipitation, n.Wind.Speed,