From 5b64a3d75eed3ed0a6fde1a8e0f9fecab698cd36 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 8 Apr 2020 10:21:56 -0300 Subject: [PATCH] Use ISO-8601 date format for last active time (#8306) The last active time for each account in the Connected Sites list was formatted as `yyyy-M-d` (i.e. without the zero-padding for the month and the day). This didn't match the designs, isn't compliant with ISO-8601, and generally isn't a common date format. The month and day are now zero-padded. --- .../pages/permissions-connect/permissions-connect.container.js | 2 +- ui/app/selectors/selectors.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app/pages/permissions-connect/permissions-connect.container.js b/ui/app/pages/permissions-connect/permissions-connect.container.js index f32ea08f0..536a4b1ef 100644 --- a/ui/app/pages/permissions-connect/permissions-connect.container.js +++ b/ui/app/pages/permissions-connect/permissions-connect.container.js @@ -36,7 +36,7 @@ const mapStateToProps = (state, ownProps) => { const addressLastConnectedMap = lastConnectedInfo[origin] || {} Object.keys(addressLastConnectedMap).forEach((key) => { - addressLastConnectedMap[key] = formatDate(addressLastConnectedMap[key], 'yyyy-M-d') + addressLastConnectedMap[key] = formatDate(addressLastConnectedMap[key], 'yyyy-MM-dd') }) const connectPath = `${CONNECT_ROUTE}/${permissionsRequestId}` diff --git a/ui/app/selectors/selectors.js b/ui/app/selectors/selectors.js index e7ae9bb8d..1bf9abba7 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/app/selectors/selectors.js @@ -498,7 +498,7 @@ export function getRenderablePermissionsDomains (state) { const selectedAddressLastConnectedTime = accountsLastConnectedTime[selectedAddress] const lastConnectedTime = selectedAddressLastConnectedTime - ? formatDate(selectedAddressLastConnectedTime, 'yyyy-M-d') + ? formatDate(selectedAddressLastConnectedTime, 'yyyy-MM-dd') : '' return [ ...acc, {