mirror of
https://github.com/strapi/strapi.git
synced 2025-11-14 17:19:01 +00:00
Fix date parser
This commit is contained in:
parent
2f67950deb
commit
98f34c162e
@ -25,6 +25,8 @@ const parseDateTimeOrTimestamp = (value) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const parseDate = (value) => {
|
const parseDate = (value) => {
|
||||||
|
if (dateFns.isDate(value)) return dateFns.format(value, 'yyyy-MM-dd');
|
||||||
|
|
||||||
const found = isString(value) ? value.match(PARTIAL_DATE_REGEX) || [] : [];
|
const found = isString(value) ? value.match(PARTIAL_DATE_REGEX) || [] : [];
|
||||||
const extractedValue = found[0];
|
const extractedValue = found[0];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user