Skip to content

Commit

Permalink
보관함에 있는 목표 조회 시 d-day 0으로 계산 (#60)
Browse files Browse the repository at this point in the history
* 보관함에 있는 목표 d-day 계산 시 0 반환하도록 변경
  • Loading branch information
jemlog authored Sep 3, 2023
1 parent 20f92d1 commit f701339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/backend/goal/domain/Goal.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public Long calculateDday(final LocalDate now)
{
if(now.isAfter(endDate))
{
throw new IllegalArgumentException("현재 일자가 종료 일자보다 뒤라면 d-day를 구할 수 없습니다.");
return 0L;
}

return ChronoUnit.DAYS.between(now, endDate);
Expand Down

0 comments on commit f701339

Please sign in to comment.