From dd373f0f063834033b9ef99b2f1c367c296e9cec Mon Sep 17 00:00:00 2001 From: Philip Chiang Date: Wed, 18 Feb 2026 18:35:03 -0800 Subject: [PATCH 1/3] Archived Accounts page: update Date Archived to YYYY-MM-DD format --- client/src/components/ArchiveDelete/RolesArchive.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/ArchiveDelete/RolesArchive.jsx b/client/src/components/ArchiveDelete/RolesArchive.jsx index 4e5bef348..a0b525990 100644 --- a/client/src/components/ArchiveDelete/RolesArchive.jsx +++ b/client/src/components/ArchiveDelete/RolesArchive.jsx @@ -11,6 +11,7 @@ import UserContext from "../../contexts/UserContext"; import { MdMoreVert, MdOutlineSearch } from "react-icons/md"; import ContentContainerWithTables from "components/Layout/ContentContainerWithTables"; import DeleteArchivedAccountModal from "components/Modals/WarningArchivedAccountDelete"; +import { formatDate } from "../../helpers/util"; const useStyles = createUseStyles(theme => ({ main: { @@ -287,7 +288,7 @@ const RolesArchive = ({ contentContainerRef }) => { {account?.numberOfSubmissions || "0"} - {new Date(account.archivedAt).toLocaleDateString()} + {formatDate(account.archivedAt)} Date: Wed, 18 Feb 2026 19:27:52 -0800 Subject: [PATCH 2/3] Update root package-lock.json to match latest package.json (updated from npm install) --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 584850e34..4004bb0d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "root", - "version": "0.2.65", + "version": "0.2.67", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "root", - "version": "0.2.65", + "version": "0.2.67", "dependencies": { "wait-on": "^8.0.3" }, From c9d7b42e13bea7834e4fca05e933d96bb8d620fa Mon Sep 17 00:00:00 2001 From: John Darragh Date: Wed, 25 Feb 2026 17:00:33 -0800 Subject: [PATCH 3/3] Fix formatDate and formatDatetime utilty fns --- client/src/helpers/util.js | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/client/src/helpers/util.js b/client/src/helpers/util.js index df01e4c52..850cfe1b6 100644 --- a/client/src/helpers/util.js +++ b/client/src/helpers/util.js @@ -1,17 +1,40 @@ import { DateTime } from "luxon"; +// parse a string as a Javascript date. +// This is primarily used when you need to do arithmetic or comparison +// of dates. export const toDate = s => (s ? new Date(s) : null); +// export const formatDate = date => { +// return date ? new Date(date).toISOString().split("T")[0] : null; +// }; + +// Format a date without time in the Pacific Time Zone. +// The input is expected to be either a Javascript Date +// OR a string in one of the formats +// parsable by luxon as listed here: https://moment.github.io/luxon/#/parsing export const formatDate = date => { - return date ? new Date(date).toISOString().split("T")[0] : null; + if (!date) return null; + const isoDate = + date instanceof Date ? DateTime.fromJSDate(date) : DateTime.fromISO(date); + const formattedDate = isoDate + .setZone("America/Los_Angeles") + .toFormat("yyyy-MM-dd"); + return formattedDate; }; -export const formatDatetime = datetime => { - return datetime - ? DateTime.fromISO(datetime) - .setZone("America/Los_Angeles") - .toFormat("yyyy-MM-dd hh:mm a") - : null; +// Format a date with time in the Pacific Time Zone +// The input is expected to be either a Javascript Date +// OR a string in one of the formats +// parsable by luxon as listed here: https://moment.github.io/luxon/#/parsing +export const formatDatetime = date => { + if (!date) return null; + const isoDate = + date instanceof Date ? DateTime.fromJSDate(date) : DateTime.fromISO(date); + const formattedDate = isoDate + .setZone("America/Los_Angeles") + .toFormat("yyyy-MM-dd hh:mm a"); + return formattedDate; }; export const formatId = id => {