From 4e4ae5ff85b4182661379fb43870aff0dde3e994 Mon Sep 17 00:00:00 2001 From: Adii <73539670+AdiMakkar@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:59:19 -0500 Subject: [PATCH] Bug fix out of date event (#215) * out of events restored for upcoming events * wip - out of date issue for the past events on event page persists * bug reverted to the original scope * out of date issue fixed --- src/app/core/services/event.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/core/services/event.service.ts b/src/app/core/services/event.service.ts index 06653ad1..35bdc044 100644 --- a/src/app/core/services/event.service.ts +++ b/src/app/core/services/event.service.ts @@ -145,7 +145,9 @@ export class EventService implements IListService { private randomDate() { let startDate = new Date(); - let endDate = new Date('2023/12/31'); + startDate.setDate(startDate.getDate() - 7); + let endDate = new Date(); + endDate.setFullYear(endDate.getFullYear() + 1); return new Date(startDate.getTime() + Math.random() * (endDate.getTime() - startDate.getTime())); }