Some code to handle leap years.