We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5704dce commit ec0d76fCopy full SHA for ec0d76f
src/features/date_fixer/date_fixer.js
@@ -6,7 +6,7 @@ import { shouldInitializeFeature, getFeatureOptions } from "../../core/options/o
6
// Function to try parsing a date string with multiple formats
7
8
export function tryParseDate(dateString, formats) {
9
- const sanitizedDateString = dateString.replace(/[/.,]/g, "-").replace(/- /g, "-");
+ const sanitizedDateString = dateString.replace(/\. /g, " ").replace(/[/.,]/g, "-").replace(/- /g, "-");
10
for (let format of formats) {
11
const parsedDate = parse(sanitizedDateString, format, new Date());
12
if (isValid(parsedDate)) {
0 commit comments