f
All checks were successful
LOCALNET-DEV/pipeline/head This commit looks good

This commit is contained in:
dyhj625 2025-04-14 13:24:33 +09:00
parent f1b3f1d953
commit 5516f71bfc

View File

@ -295,11 +295,15 @@ public class localvacaService {
LocalDate today = LocalDate.now();
int currentYear = today.getYear();
int hireYear = hireDate.getYear();
int hireMonth = hireDate.getMonthValue();
// 입사일부터 오늘까지의 전체 근속 개월 계산
int workMonths = (int) ChronoUnit.MONTHS.between(hireDate, today);
// 올해 입사자 1년 미만: 입사월 이후로 계산
if (hireYear == currentYear) {
return 12 - hireMonth;
return 12 - workMonths;
}else if(workMonths < 12) {
return 12;
}
int totalVacation = 15;