Streamlined isLeapYear function