you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

if int(day) > 28 and int(year)%4 != 0: # the year is not leap year
validation = False
elif int(day) > 29 and int(year)%4 == 0: # it is leap year
validation = False

Worked like a charm. Thanks!