diff --git a/src/app/utils/holidayUtils.ts b/src/app/utils/holidayUtils.ts index 30b0e52..c0a14d1 100644 --- a/src/app/utils/holidayUtils.ts +++ b/src/app/utils/holidayUtils.ts @@ -13,7 +13,8 @@ export const getPublicHolidaysForNYears = (years: number = 1, currYr?: number) = .fill(undefined) .flatMap((_, index) => { const currentYear = currYr ?? new Date().getFullYear(); - const holidays = hd.getHolidays(currentYear + index); + const holidays = hd.getHolidays(currentYear - index); + console.log(holidays) return holidays.map((ele) => { const tempDay = new Date(ele.date); const tempYear = tempDay.getFullYear(); @@ -66,7 +67,7 @@ export const getHolidayForDate = ( INPUT_DATE_FORMAT, ), })) - .concat(getPublicHolidaysForNYears(1).concat()); + .concat(getPublicHolidaysForNYears(2).concat()); return currentYearHolidays.find((h) => h.date === date); };