Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError After UnsetRule #56

Open
papaspiridis opened this issue Nov 4, 2023 · 0 comments
Open

TypeError After UnsetRule #56

papaspiridis opened this issue Nov 4, 2023 · 0 comments

Comments

@papaspiridis
Copy link

Hello,
I want to ignore a holiday by using unsetRule. The holiday does not appear in the list returned by getHolidays however when checking for that date using isHoliday I get the following Typerror

const hd = new Holidays();
hd.init('GR', { types: ['public'] });
hd.isHoliday('2023-04-14'); //returns true
hd.unsetRule('orthodox -2'); //returns true
hd.isHoliday('2023-04-14'); // => throws error
Uncaught TypeError: Cannot read property 'inYear' of undefined
    at Holidays.isHoliday (node_modules/date-holidays-parser/lib/Holidays.cjs:220:33)
    at Holidays._dateByRule (node_modules/date-holidays-parser/lib/Holidays.cjs:396:28)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant