This commit is contained in:
Mrx
2026-03-06 10:56:36 +08:00
parent 9e9cee02f5
commit 7d2716da7a

View File

@@ -4011,8 +4011,10 @@ func calculateAgeAndSex(idCard string) (int, string) {
return 0, ""
}
now := time.Now()
// 计算年龄(简化处理,使用当前年份)
age := 2024 - year
age := now.Year() - year
// 提取性别第17位奇数为男偶数为女
sexCode := idCard[16:17]