Image of the glider from the Game of Life by John Conway
Skip to content

29 And Holding

1
2
3
4
5
6
7
8
9
10
11
12
from datetime import date

birth_day = date(1977, 6, 9)
right_now = date.today()

if (right_now.month >= birth_day.month) & (right_now.day >= birth_day.day):
    age = right_now.year - birth_day.year
else:
    age = right_now.year - birth_day.year - 1

if age >= 30:
    age = 29

{ 20 } Comments