From 4acb2bb9c3ecb40e1c416c152234e0ee74364b73 Mon Sep 17 00:00:00 2001 From: ahmedyasser <26207361+1AhmedYasser@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:29:41 +0300 Subject: [PATCH] Only Added Public Holidays --- src/utils/holidays.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/holidays.ts b/src/utils/holidays.ts index 386597d3..91f74931 100644 --- a/src/utils/holidays.ts +++ b/src/utils/holidays.ts @@ -12,7 +12,9 @@ interface HolidaysData { } function getHolidays(): HolidaysData { - const holidaysList: Holiday[] = new Holidays(CURRENT_COUNTRY) + const holidaysList: Holiday[] = new Holidays(CURRENT_COUNTRY, { + types: ["public"], + }) .getHolidays() .map((obj: any) => { const formattedDate: string = obj.date.split(" ")[0]; @@ -23,9 +25,7 @@ function getHolidays(): HolidaysData { }); const holidays: string[] = holidaysList.map((obj: Holiday) => obj.date); - const holidayNames: string = holidaysList - .map((obj: Holiday) => `${obj.date}-${obj.name}`) - .join(","); + const holidayNames: string = holidaysList.map((obj: Holiday) => `${obj.date}-${obj.name}`).join(","); return { holidays,