by hairtuq · 1y ago · 0 comments
((year * 1073750999) & 3221352463) <= 126976
How this works is surprisingly complex, I am thinking of writing a whole blog post about it...Historical minor quibble - formula correct for 1582 <= year <= 102499 (well, it's actually correct down to 1201, but the gregorian calendar didn't start until oct 1582... and then you get into the quagmire about when each country adopted the gregorian calendar, if they ever did)