说明:本文实例讲述了python根据出生日期返回年龄的方法。分享给大家供大家参考。具体实现方法如下:
def CalculateAge(self, Date):
'''Calculates the age and days until next birthday from the given birth date'''
try:
Date = Date.split('.')
BirthDate = datetime.date(int(Date[0]), int <weixin_38584731> 上传 | 大小:28kb