Fixed handling of negative years. Also optimized the logic - when you consider the Gregorian Calendar cycle to run from 400N+1 to 400N+400, the leap century day falls after the last January 1st of the cycle, so you don't need to account for it.
Oh dear! Your browser is either unsupported or there has been a problem loading the page.