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

RangeError When Year is 3765 #84

Open
HeyITGuyFixIt opened this issue Dec 20, 2020 · 3 comments
Open

RangeError When Year is 3765 #84

HeyITGuyFixIt opened this issue Dec 20, 2020 · 3 comments

Comments

@HeyITGuyFixIt
Copy link

HeyITGuyFixIt commented Dec 20, 2020

I get this error when I create an instance of Hebcal with the year 3765:

Uncaught RangeError: Maximum call stack size exceeded
    at i (hebcal.min.js:formatted:1148)
    at a (hebcal.min.js:formatted:1146)
    at i (hebcal.min.js:formatted:1152)
    at a (hebcal.min.js:formatted:1146)
    at i (hebcal.min.js:formatted:1152)
    at a (hebcal.min.js:formatted:1146)
    at i (hebcal.min.js:formatted:1152)
    at a (hebcal.min.js:formatted:1146)
    at i (hebcal.min.js:formatted:1152)
    at a (hebcal.min.js:formatted:1146)

I am checking it like this:

new Hebcal(3768);

I am using hebcal.min.js from the master branch, which is up-to-date as of today.

@HeyITGuyFixIt
Copy link
Author

It also happens on 3777 and 3793.

@HeyITGuyFixIt HeyITGuyFixIt changed the title RangeError when Checking if Year 3765 is a Leap Year RangeError Year is 3765 Dec 20, 2020
@HeyITGuyFixIt HeyITGuyFixIt changed the title RangeError Year is 3765 RangeError When Year is 3765 Dec 20, 2020
@HeyITGuyFixIt
Copy link
Author

I looped through every year from year 0 to 6000, and found that this only occurs on years 3765, 3777, 3793, 3805, 3821, and 3833.

@mjradwin
Copy link
Member

You might have better luck with @hebcal/core instead of hebcal

It has a similar API but not identical. You can see an example of how you might use the API here:

https://codepen.io/mjradwin/pen/bGwYXMy

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

2 participants