Skip to content

Commit

Permalink
Merge pull request #209 from 1AhmedYasser/Enhancment-only-add-public-…
Browse files Browse the repository at this point in the history
…holidays

Enhancement Holidays List
  • Loading branch information
varmoh authored Jun 7, 2024
2 parents fa3e3f1 + 4acb2bb commit 2994c78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/holidays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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,
Expand Down

0 comments on commit 2994c78

Please sign in to comment.