use passed format instead of hard coded one

This commit is contained in:
Thomas Ruoff
2020-08-22 00:09:57 +02:00
parent ebdcd5cd24
commit 1df26814ba

View File

@@ -36,7 +36,7 @@ export function dateFormatFrontend(date) {
}
function dateParse(string, format) {
const date = moment(string, 'MM-DD-YYYY')
const date = moment(string, format)
if (date.isValid()) {
return date.getDate()
}