|
|
@ -53,8 +53,12 @@ module.exports = class { |
|
|
|
|
|
|
|
let fictionalDate = new Date(values.fictionalDate + " UTC") |
|
|
|
if (values.fictionalDate != "") { |
|
|
|
if (Number.isNaN(fictionalDate)) { |
|
|
|
this.state.error = `Could not parse ${values.fictionalDate} as date!` |
|
|
|
if (Number.isNaN(fictionalDate.getTime())) { |
|
|
|
this.state.error = `Could not parse ${values.fictionalDate} as date.` |
|
|
|
if (values.fictionalDate.includes("th")) { |
|
|
|
this.state.error += " Try to remove the 'th'." |
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
} |
|
|
|
} else { |
|
|
|