Skip to content

Commit

Permalink
[feat] 최근 일정 보기 기능에서 현재 날짜를 포함하여 가장 최근의 일정을 보도록 수정 (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh committed Nov 10, 2024
1 parent 43cc6de commit 6b8c08b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public RecentCalendarResponse getRecentCalendarResponse() {
LocalDate now = ZonedDateTime.now(ZoneId.of("Asia/Seoul")).toLocalDate();

return this.getAllCurrentGenerationCalendar().stream()
.filter(calendar -> calendar.getEndDate().isAfter(now))
.filter(calendar -> !calendar.getStartDate().isBefore(now))
.findFirst().map(RecentCalendarResponse::of)
.orElseGet(() -> RecentCalendarResponse.createEmptyCalendar(now));
}
Expand Down

0 comments on commit 6b8c08b

Please sign in to comment.