[BirthDate] Un coup de PEP8

This commit is contained in:
Vincent Le Gallic 2014-02-03 17:03:51 +01:00
parent b2003525a7
commit dc1600000d

View file

@ -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