Commit dc160000 authored by Vincent Le gallic's avatar Vincent Le gallic

[BirthDate] Un coup de PEP8

parent b2003525
......@@ -14,10 +14,10 @@ def execute(macro, text):
year, month, day = text.split(",")
y, m, d = int(year), int(month), int(day)
now = datetime.datetime(*time.localtime()[:6])
if m==2 and d==29:
birthdate = datetime.datetime(now.year, 3, 01)
if now.month==2 and now.day==29:
now = datetime.datetime(now.year, 3, 01)
if (m, d) == (2, 29):
birthdate = datetime.datetime(now.year, 3, 1)
if (now.month, now.day) == (2, 29):
now = datetime.datetime(now.year, 3, 1)
else:
birthdate = datetime.datetime(now.year, m, d)
age = now.year - y
......
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 to comment