You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
numberToSimpleDate returns day 0 for 31 December of some years when leapYear1900 is true #1793
With leapYear1900: true, numberToSimpleDate decomposes 31 December of 32 years between 1900 and 2200 (for example 2036 and 2040) as day 0 of January of the next year. =EOMONTH(DATE(2036,12,31),0) returns 31 January 2037, and TEXT of that serial shows 2037-01-00. It happens with and without nullDate 1899-12-31.
The year check in that function compares against {year: year - 1, …} where {year, …} looks intended. Changing it brings the 32 affected years to 0 in both leap configurations, leaves the default configuration unchanged, and the 80 date, EDATE, EOMONTH and DAY specs I ran still pass.
Found while reviewing #1781. That PR doesn't cause it.
Activity