python-lunardate
python-lunardate copied to clipboard
a better error than IndexError
>>> a = lunardate.LunarDate(1,2,3)
>>> a.toSolarDate()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/lunardate.py", line 190, in toSolarDate
offset += _calcDays(yearInfos[yearIdx], self.month, self.day, self.isLeapMonth)
IndexError: list index out of range