use FormatitemDate for FormatDate
This commit is contained in:
+11
-9
@@ -105,16 +105,18 @@ func FormatDate(t time.Time) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
df := dateFormatForLocale(fyne.CurrentDevice().Locale().String())
|
v := []int{
|
||||||
switch df {
|
t.Local().Year(),
|
||||||
case DateFormatDMY:
|
int(t.Local().Month()),
|
||||||
return t.Format("2 Jan 2006")
|
t.Local().Day(),
|
||||||
case DateFormatMDY:
|
|
||||||
return t.Format("Jan 2 2006")
|
|
||||||
case DateFormatYMD:
|
|
||||||
return t.Format("2006 Jan 2")
|
|
||||||
}
|
}
|
||||||
return ""
|
id := mediaprovider.ItemDate{
|
||||||
|
Year: &v[0],
|
||||||
|
Month: &v[1],
|
||||||
|
Day: &v[2],
|
||||||
|
}
|
||||||
|
|
||||||
|
return FormatItemDate(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
func LastPlayedDisplayString(t time.Time) string {
|
func LastPlayedDisplayString(t time.Time) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user