txlyre 2 年之前
父节点
当前提交
ab5de5cd62
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      utils.py

+ 1 - 1
utils.py

@@ -121,7 +121,7 @@ def calculate_age(date):
     birthday_date = date.replace(year=now.year + 1)
 
   delta = birthday_date - now
-  age = (birthday_date - birthday.date).days // 365
+  age = (birthday_date - date).days // 365
   age_now = age - 1
 
   return Age(