hebcal / hebcal-js

⛔️ DEPRECATED - a perpetual Jewish Calendar (JavaScript)
GNU General Public License v3.0
123 stars 40 forks source link

`HDate.getTishreiMonth()` in Elul returns 0 #16

Closed Scimonster closed 8 years ago

Scimonster commented 9 years ago

Easy fix, just add an || clause to return MONTHS_IN_YEAR if it's 0 (due to %).

var hd = new Hebcal.HDate('15 Elul');
console.log(hd.getTishreiMonth()); // 0