출퇴근 관리 디폴트 날짜 -> 현재날짜 -1

This commit is contained in:
hylee 2024-02-16 09:27:19 +09:00
parent 002dc218f9
commit 4afe85bd87

View File

@ -36,15 +36,13 @@ public class CommuteServiceImpl implements CommuteService {
}else{
// 현재 날짜 구하기
LocalDate now = LocalDate.now();
LocalDate now = LocalDate.now().minusDays(1);
// 년도 구하기
String year = String.valueOf(now.getYear());
// 구하기, 자리수일 경우 앞에 0 붙이기
String month = now.format(DateTimeFormatter.ofPattern("M"));
// 구하기, 자리수일 경우 앞에 0 붙이기
String day = now.format(DateTimeFormatter.ofPattern("d"));