mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
use passed format instead of hard coded one
This commit is contained in:
@@ -36,7 +36,7 @@ export function dateFormatFrontend(date) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dateParse(string, format) {
|
function dateParse(string, format) {
|
||||||
const date = moment(string, 'MM-DD-YYYY')
|
const date = moment(string, format)
|
||||||
if (date.isValid()) {
|
if (date.isValid()) {
|
||||||
return date.getDate()
|
return date.getDate()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user