Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

age calculator in python


from datetime import date

def calculate_age(born):
    today = date.today()
    return today.year - born.year - ((today.month, today.day) < (born.month, born.day))

Source by codefantasy.org #
 
PREVIOUS NEXT
Tagged: #age #calculator #python
ADD COMMENT
Topic
Name
8+2 =