aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2020-11-14 20:05:28 -0500
committerGalen Guyer <galen@galenguyer.com>2020-11-14 20:05:28 -0500
commited3c6044670f1a4f83a1174afd23c4171a3449c5 (patch)
tree0216a87b81ddae43369772c6652dc37a63b3e3cc
parent89a4e929a9b97867f9ed8f57b41a0a661ad34d0b (diff)
add prior update time
-rw-r--r--src/App.js15
1 files changed, 14 insertions, 1 deletions
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 (
<BrowserRouter>
<div className="App">
- <h1 className="text-4xl"><Link to="/">RIT Covid Dashboard</Link></h1>
+ <h1 className="text-4xl">
+ <Link to="/">RIT Covid Dashboard</Link>
+ </h1>
<h3>
Last Updated:{" "}
{lastUpdate.toLocaleString({
@@ -44,6 +47,16 @@ function App() {
minute: "2-digit",
})}
</h3>
+ <h4 className="text-sm text-gray-600">
+ Prior Update:{" "}
+ {priorUpdate.toLocaleString({
+ weekday: "long",
+ month: "long",
+ day: "2-digit",
+ hour: "2-digit",
+ minute: "2-digit",
+ })}
+ </h4>
<br />
<Switch>
<Route exact path="/">