0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Updated getActiveWeatherSeason() to treat eventEndDate as inclusive

This commit is contained in:
Chomp 2024-12-31 09:25:42 +00:00
parent 91a9cb8964
commit c46d97a65a

View File

@ -285,7 +285,13 @@ export class SeasonalEventService {
seasonRange.startMonth - 1, // Month value starts at 0 seasonRange.startMonth - 1, // Month value starts at 0
seasonRange.startDay, seasonRange.startDay,
); );
const eventEndDate = new Date(currentDate.getFullYear(), seasonRange.endMonth - 1, seasonRange.endDay); const eventEndDate = new Date(
currentDate.getFullYear(),
seasonRange.endMonth - 1,
seasonRange.endDay,
23,
59,
);
// Does todays date fit inside the above range // Does todays date fit inside the above range
if (currentDate >= eventStartDate && currentDate <= eventEndDate) { if (currentDate >= eventStartDate && currentDate <= eventEndDate) {