From cb9728775b0e5eca8c705c0e2c61f9171b7068d9 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Mon, 20 Dec 2021 21:14:53 -0600 Subject: Upgraded http-proxy-middleware to 2.0.1 and fixed reports --- modern/src/common/formatter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modern/src/common') diff --git a/modern/src/common/formatter.js b/modern/src/common/formatter.js index f8a55da..ad0ffa2 100644 --- a/modern/src/common/formatter.js +++ b/modern/src/common/formatter.js @@ -4,10 +4,10 @@ export const formatBoolean = (value, t) => (value ? t('sharedYes') : t('sharedNo export const formatNumber = (value, precision = 1) => Number(value.toFixed(precision)); -export const formatDate = (value, locale) => new Intl.DateTimeFormat(locale, { +export const formatDate = (value, locale = 'es') => value ? new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'short', -}).format(Date.parse(value)); +}).format(new Date(value)) : ''; export const formatPosition = (value, key, t, locale = 'es') => { if (value != null && typeof value === 'object') { -- cgit v1.2.3