diff --git a/src/pages/catchup.jsx b/src/pages/catchup.jsx index 1c5fae3f..6e9ece7f 100644 --- a/src/pages/catchup.jsx +++ b/src/pages/catchup.jsx @@ -956,10 +956,12 @@ function Catchup() { {' '} - {formatRange( - new Date(pc.startAt), - new Date(pc.endAt), - )} + {pc.startAt + ? dtf.formatRange( + new Date(pc.startAt), + new Date(pc.endAt), + ) + : `… – ${dtf.format(new Date(pc.endAt))}`} {' '} @@ -1011,7 +1013,7 @@ function Catchup() { {posts.length > 0 && (

- {formatRange( + {dtf.formatRange( new Date(posts[0].createdAt), new Date(posts[posts.length - 1].createdAt), )} @@ -1836,9 +1838,6 @@ const dtf = new Intl.DateTimeFormat(locale, { hour: 'numeric', minute: 'numeric', }); -function formatRange(startDate, endDate) { - return dtf.formatRange(startDate, endDate); -} function binByTime(data, key, numBins) { // Extract dates from data objects