Great script! However, I noticed that it can be inaccurate calculating the last month and leap years. It turns out that although your getLastDayOfMonth() function does accept a year, you never pass it one, so all the calculations are done with year zero. You should pass selectedYear when you make these calls. Cheers!
Great script! However, I noticed that it can be inaccurate calculating the last month and leap years. It turns out that although your
getLastDayOfMonth()function does accept a year, you never pass it one, so all the calculations are done with year zero. You should passselectedYearwhen you make these calls. Cheers!