Skip to content

Commit 37779b4

Browse files
authored
Merge pull request #58 from ChillCoders-CapstoneDesign/feature/notification
refactor: 디데이 계산 로직 수정
2 parents 7cab261 + 789db87 commit 37779b4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/com/project/submate/subscribe/service/SubscribeService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ public SubscribeListResponseDto subscribeAllList() {
5656
private int calculateDday(LocalDate startDate) {
5757
// LocalDate.plusMonths: 자동으로 월의 마지막 날짜를 고려하여 계산한다.
5858
// LocalDate baseDate = startDate.plusMonths(1); // 기준일: startDate + 1달
59+
60+
if (startDate == null) {
61+
return 0;
62+
}
63+
5964
LocalDate now = LocalDate.now(ZoneId.of("Asia/Seoul"));
6065

6166
// 반복 결제일: 매달 startDate의 day에 결제된다고 가정한다.

0 commit comments

Comments
 (0)