Skip to content

Commit

Permalink
Fix [#115] 홈뷰 null handling (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
geniusYoo authored Jul 16, 2024
2 parents 12e6626 + 11c65c3 commit 6732005
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ public List<CategoryTaskLink> getCategoryTaskByCategories(List<CategoryCheckResp

public boolean isContains(CategoryCheckResponse categoryCheckResponse, LocalDate idxDate) {
if (categoryCheckResponse.endDate() == null) {

return categoryCheckResponse.startDate().isBefore(idxDate) ||
categoryCheckResponse.startDate().equals(idxDate);
}
return (categoryCheckResponse.startDate().isBefore(idxDate) &&
else return (categoryCheckResponse.startDate().isBefore(idxDate) &&
categoryCheckResponse.endDate().isAfter(idxDate)) ||
categoryCheckResponse.startDate().equals(idxDate) ||
categoryCheckResponse.endDate().equals(idxDate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ public Task getTaskById(Long taskId) {
}

public boolean isContains(TaskWithTaskTimer taskWithTaskTimer, LocalDate idxDate) {
return taskWithTaskTimer.startDate().equals(idxDate) || // startDate = idxDate
if (taskWithTaskTimer.endDate() == null) {
return taskWithTaskTimer.startDate().isBefore(idxDate) ||
taskWithTaskTimer.startDate().equals(idxDate);
}
else return taskWithTaskTimer.startDate().equals(idxDate) || // startDate = idxDate
taskWithTaskTimer.endDate().equals(idxDate) || // endDate = idxDate
(taskWithTaskTimer.startDate().isBefore(idxDate) && taskWithTaskTimer.endDate().isAfter(idxDate)); // startDate, endDate가 idxDate를 포함
}
Expand Down

0 comments on commit 6732005

Please sign in to comment.