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 })
|
return t('filter.channels', { value })
|
||||||
},
|
},
|
||||||
date(value) {
|
date(value) {
|
||||||
return DateTime.fromISO(value)
|
if (value) {
|
||||||
.setLocale(locale.value)
|
return DateTime.fromISO(value, { locale: locale.value }).toLocaleString(
|
||||||
.toLocaleString(DateTime.DATE_FULL)
|
DateTime.DATE_FULL
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return null
|
||||||
},
|
},
|
||||||
datetime(value) {
|
datetime(value) {
|
||||||
return DateTime.fromISO(value)
|
if (value) {
|
||||||
.setLocale(locale.value)
|
return DateTime.fromISO(value, { locale: locale.value }).toLocaleString(
|
||||||
.toLocaleString(DateTime.DATETIME_MED)
|
DateTime.DATETIME_MED
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return null
|
||||||
},
|
},
|
||||||
durationInDays(value) {
|
durationInDays(value) {
|
||||||
const minutes = Math.floor(value / 60)
|
const minutes = Math.floor(value / 60)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user