출퇴근 관리 디폴트 날짜 -> 현재날짜 -1
This commit is contained in:
parent
002dc218f9
commit
4afe85bd87
@ -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"));
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user