Add checking of maximum days in month, with support for leap years.