mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-03 23:30:09 -05:00
[web] Fix invalid dates
This commit is contained in:
parent
e3c8d1fab9
commit
fcb8d67859
@ -17,14 +17,20 @@ export const filters = {
|
||||
return t('filter.channels', { value })
|
||||
},
|
||||
date(value) {
|
||||
return DateTime.fromISO(value)
|
||||
.setLocale(locale.value)
|
||||
.toLocaleString(DateTime.DATE_FULL)
|
||||
if (value) {
|
||||
return DateTime.fromISO(value, { locale: locale.value }).toLocaleString(
|
||||
DateTime.DATE_FULL
|
||||
)
|
||||
}
|
||||
return null
|
||||
},
|
||||
datetime(value) {
|
||||
return DateTime.fromISO(value)
|
||||
.setLocale(locale.value)
|
||||
.toLocaleString(DateTime.DATETIME_MED)
|
||||
if (value) {
|
||||
return DateTime.fromISO(value, { locale: locale.value }).toLocaleString(
|
||||
DateTime.DATETIME_MED
|
||||
)
|
||||
}
|
||||
return null
|
||||
},
|
||||
durationInDays(value) {
|
||||
const minutes = Math.floor(value / 60)
|
||||
|
Loading…
x
Reference in New Issue
Block a user