ค้นหาทะเบียน

This commit is contained in:
Kittapath 2024-03-26 09:47:17 +07:00
parent e368c4cae8
commit 6e8b8d58b9
5 changed files with 1412 additions and 32 deletions

View file

@ -32,8 +32,8 @@ export function calculateRetireDate(birthDate: Date) {
if (dd >= 2) flag = false;
break;
case 11:
break;
case 12:
flag = false;
break;
}
@ -41,3 +41,25 @@ export function calculateRetireDate(birthDate: Date) {
return new Date(`${yy + 61}-09-30T00:00:00.000+07:00`);
}
export function calculateRetireYear(birthDate: Date) {
let dd = birthDate.getDate();
let mm = birthDate.getMonth();
let yy = birthDate.getFullYear();
let flag = true;
switch (mm) {
case 10:
if (dd >= 2) flag = false;
break;
case 11:
break;
case 12:
break;
}
if (flag) return yy + 60;
return yy + 61;
}