1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package main import ( "time" ) type DateModule struct { } // getDate formats a string for the status bar func (_ DateModule) GetInfo() (string, error) { now := time.Now() // return string([]rune(now.Weekday().String()[0:3])) // return now.Format(time.Stamp) return string([]rune(now.Month().String())) + " " + now.Format(time.Kitchen), nil }