Commit 42195a65 by 王昆

gsb

parent bad8d476
......@@ -111,7 +111,7 @@ class IdcardClient {
let myDate = new Date();
let month = myDate.getMonth() + 1;
let day = myDate.getDate();
let age = Number(myDate.getFullYear()) - Number(card.substring(6, 10)) - 1;
let age = Number(myDate.getFullYear()) - Number(card.substring(6, 10));
if (card.substring(10, 12) < month || card.substring(10, 12) == month && card.substring(12, 14) <= day) {
age++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment