Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Brian Cao committed 2023-08-15 10:57:34 -07:00
commit 14df1e5a29
9 files changed
+46 -16

No files matched your search

+7 -3
View File
@@ -250,9 +250,13 @@ export const customFormats = {
};
export function dateFormat(date, str, locale = 'en-US') {
return format(date, customFormats?.[locale]?.[str] || str, {
locale: getDateLocale(locale),
});
return format(
typeof date === 'string' ? new Date(date) : date,
customFormats?.[locale]?.[str] || str,
{
locale: getDateLocale(locale),
},
);
}
export function maxDate(...args) {