diff --git a/src/components/status.jsx b/src/components/status.jsx index ab57b354..6b316be7 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -1295,7 +1295,14 @@ function EditedAtModal({ return ( <li key={createdAt} class="history-item"> <h3> - <time>{niceDateTime(createdAtDate)}</time> + <time> + {niceDateTime(createdAtDate, { + formatOpts: { + weekday: 'short', + second: 'numeric', + }, + })} + </time> </h3> <Status status={status} diff --git a/src/utils/nice-date-time.js b/src/utils/nice-date-time.js index e641d03e..ce349acc 100644 --- a/src/utils/nice-date-time.js +++ b/src/utils/nice-date-time.js @@ -1,4 +1,4 @@ -function niceDateTime(date, { hideTime } = {}) { +function niceDateTime(date, { hideTime, formatOpts } = {}) { if (!(date instanceof Date)) { date = new Date(date); } @@ -12,6 +12,7 @@ function niceDateTime(date, { hideTime } = {}) { // Hide time if requested hour: hideTime ? undefined : 'numeric', minute: hideTime ? undefined : 'numeric', + ...formatOpts, }).format(date); return dateText; }