We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2888cee commit 97d45b4Copy full SHA for 97d45b4
scripts/utils/datetime.js
@@ -12,7 +12,7 @@ const datePatternWithoutComma = /^(\w+) (\d+ \w+ \d+)$/;
12
export function formatDateFull(date) {
13
const formattedDate = date.toLocaleDateString(locale, dateFullOptions);
14
// insert comma after day name if not already present
15
- const match = formattedDate.match(datePatternWithoutComma);
+ const match = datePatternWithoutComma.exec(formattedDate);
16
if (match) {
17
return `${match[1]}, ${match[2]}`;
18
}
0 commit comments