Apr-26-2023, 03:36 PM
(This post was last modified: Apr-26-2023, 03:37 PM by deanhystad.)
I fail to see why leap year matters at all.
If this is not a leap year and today is March 1, (today.month, today.day) >= (bday.month, bday.day) is True.
Quote:# correct the bday, if it's the 29th february and today is not a leap yaarIf you were born on leap day, and today is leap day, (today.month, today.day) >= (bday.month, bday.day) is True.
if bday.month == 2 and bday.day == 29 and not calendar.isleap(today.year):
bday = datetime.date(bday.year, 3, 1)
If this is not a leap year and today is March 1, (today.month, today.day) >= (bday.month, bday.day) is True.