Skip to content

Commit

Permalink
fixed date formats
Browse files Browse the repository at this point in the history
  • Loading branch information
danreale committed Sep 22, 2024
1 parent 2e4ecfc commit 9c2cf2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/routes/day.$day._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ export default function Daily() {
<div>
<Header />
<h1 className="text-center text-4xl">Day's Data</h1>
<h2 className="text-center text-4xl text-yellow-500 italic pb-2">
{params.day}
<h2 className="text-center text-4xl text-yellow-500 italic font-semibold pb-2">
{DateTime.fromFormat(params.day!!, "yyyy-MM-dd").toLocaleString(
DateTime.DATE_MED_WITH_WEEKDAY
)}
</h2>

{pageLoading && (
Expand Down
7 changes: 5 additions & 2 deletions app/routes/yesterday._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ export default function Yesterday() {
<div>
<Header />
<h1 className="text-center text-4xl">Yesterday's Data</h1>
<h2 className="text-center text-4xl text-yellow-500 italic pb-2">
{params.get("reportDate") || todaysDate}
<h2 className="text-center text-4xl text-yellow-500 italic font-semibold pb-2">
{DateTime.fromFormat(
params.get("reportDate") || todaysDate,
"MM-dd-yyyy"
).toLocaleString(DateTime.DATE_MED_WITH_WEEKDAY)}
</h2>

{pageLoading && (
Expand Down

0 comments on commit 9c2cf2e

Please sign in to comment.