From ed3c6044670f1a4f83a1174afd23c4171a3449c5 Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Sat, 14 Nov 2020 20:05:28 -0500 Subject: add prior update time --- src/App.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/App.js b/src/App.js index e85330d..3c0b486 100644 --- a/src/App.js +++ b/src/App.js @@ -29,11 +29,14 @@ function App() { const prior = data[data.length - 2]; const local = DateTime.local().zoneName; const lastUpdate = DateTime.fromSQL(latest.last_updated, { zone: "UTC" }).setZone(local); + const priorUpdate = DateTime.fromSQL(prior.last_updated, { zone: "UTC" }).setZone(local); return (
-

RIT Covid Dashboard

+

+ RIT Covid Dashboard +

Last Updated:{" "} {lastUpdate.toLocaleString({ @@ -44,6 +47,16 @@ function App() { minute: "2-digit", })}

+

+ Prior Update:{" "} + {priorUpdate.toLocaleString({ + weekday: "long", + month: "long", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + })} +


-- cgit v1.2.3