1
0

Date format was moved out to a const.

This commit is contained in:
Alexander Andreev 2023-03-13 02:12:21 +04:00
parent 95e9d97a22
commit 8e0d5e4fb7
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -7,6 +7,8 @@ import (
"time"
)
const MostListenedDateFormat = "02 January 2006"
type MostListenedSong struct {
Listeners int
Date time.Time
@ -14,7 +16,7 @@ type MostListenedSong struct {
}
func (mls *MostListenedSong) DateString() string {
return mls.Date.Format("02 January 2006")
return mls.Date.Format(MostListenedDateFormat)
}
var mostListened MostListenedSong