Skip to content

Commit

Permalink
CMS-603: Update changelog datestamp (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncan-oxd authored Jan 4, 2025
1 parent 35841a5 commit 088a273
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/ChangeLogsList.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PropTypes from "prop-types";
import { formatTimestamp } from "@/lib/utils";
import { formatDate } from "@/lib/utils";

import "./ChangeLogsList.scss";

Expand All @@ -17,7 +17,7 @@ export default function ChangeLogsList({ changeLogs = [] }) {
)}
<span className="note-metadata">
{changeLog.notes ? "" : "Submitted "}
{formatTimestamp(changeLog.createdAt)} by {changeLog.user.name}
{formatDate(changeLog.createdAt)} by {changeLog.user.name}
</span>
</p>
))}
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ const DATE_FORMAT_DEFAULT = "MMMM d, yyyy";
// Abbreviated day of the week, abbreviated month, day
const DATE_FORMAT_SHORT = "EEE, MMM d";
const DATE_FORMAT_SHORT_WITH_YEAR = "EEE, MMM d, yyyy";
// Abbreviated month, day, year, time
const DATE_FORMAT_TIMESTAMP = "MMM d, yyyy, h:mm a";

export function normalizeToUTCDate(dateObject) {
return new Date(
Expand Down Expand Up @@ -59,10 +57,6 @@ export function formatDateRange(dateRange) {
return `${startDate} - ${endDate}`;
}

export function formatTimestamp(timestamp) {
return isoToFormattedString(timestamp, DATE_FORMAT_TIMESTAMP);
}

export function formatDatetoISO(date) {
if (!date) return "";

Expand Down

0 comments on commit 088a273

Please sign in to comment.