Skip to content

Commit

Permalink
fix: Date Parsing - maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Voccia committed Oct 31, 2024
1 parent 78a2702 commit 828efb4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/components/EventDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ export function EventDetails({
day: "numeric",
month: "long",
});
let strDate;
try {
strDate = formatter.format(date);
} catch (ex) {
strDate = date.toLocaleDateString("en-US", {

Check failure on line 30 in app/components/EventDetails.tsx

View workflow job for this annotation

GitHub Actions / lint

'strDate' is assigned a value but never used
month: "long",
day: "numeric",
year: "numeric",
});
}

return (
<article className={`event-details medium event-details-${weight}`}>
<h3 className="event-details-date">{formatter.format(date)}</h3>
Expand Down

0 comments on commit 828efb4

Please sign in to comment.