calculates age group 2k
This commit is contained in:
@@ -263,3 +263,8 @@ def myqueue(queue,function,*args,**kwargs):
|
||||
return job
|
||||
|
||||
|
||||
from datetime import date
|
||||
|
||||
def calculate_age(born):
|
||||
today = date.today()
|
||||
return today.year - born.year - ((today.month, today.day) < (born.month, born.day))
|
||||
|
||||
Reference in New Issue
Block a user