Commit 6b664aab by likorn

Fixed a bug with b-days this year

parent 785a74f5
Showing with 6 additions and 3 deletions
......@@ -15,6 +15,9 @@ print("You're "+str(age)+" years old")
if (b_day.month == today.month) and (b_day.day == today.day):
print("Happy b-day!")
elif b_day.month >= today.month :
next_b_day = datetime.date(today.year, b_day.month, b_day.day)
else:
days_left = next_b_day - today
print("There're "+str(days_left)+" left")
\ No newline at end of file
next_b_day = datetime.date(today.year + 1, b_day.month, b_day.day)
days_left = next_b_day - today
print("There're "+str(days_left)+" left")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment