Update isPastEvent to consider events one day ahead

Modify isPastEvent function to check if the event is more than one day in the future.
This commit is contained in:
Gommo203
2025-11-19 01:20:06 -05:00
committed by GitHub
parent 174beae4ea
commit 7efe188a4f

View File

@@ -54,8 +54,12 @@
const isPastEvent = (dateString: string): boolean => { const isPastEvent = (dateString: string): boolean => {
const eventDate = parseEventDate(dateString); const eventDate = parseEventDate(dateString);
const now = new Date(); // Add 1 day to the event date
return eventDate < now; const eventDatePlusOneDay = new Date(eventDate.getTime() + 24 * 60 * 60 * 1000);
return now > eventDatePlusOneDay;
// const now = new Date();
// return eventDate < now;
}; };
const filtered = $derived((events ?? []).filter(matchCategory)); const filtered = $derived((events ?? []).filter(matchCategory));