Skip to content

[refactor] DateUtil 합치기 (#55)#60

Merged
seongjunnoh merged 1 commit into
developfrom
feat/#55-room-search
Jul 9, 2025
Merged

[refactor] DateUtil 합치기 (#55)#60
seongjunnoh merged 1 commit into
developfrom
feat/#55-room-search

Conversation

@seongjunnoh

@seongjunnoh seongjunnoh commented Jul 9, 2025

Copy link
Copy Markdown
Collaborator

#️⃣ 연관된 이슈

closes #이슈번호

📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

📸 스크린샷

💬 리뷰 요구사항

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

📌 PR 진행 시 이러한 점들을 참고해 주세요

* P1 : 꼭 반영해 주세요 (Request Changes) - 이슈가 발생하거나 취약점이 발견되는 케이스 등
* P2 : 반영을 적극적으로 고려해 주시면 좋을 것 같아요 (Comment)
* P3 : 이런 방법도 있을 것 같아요~ 등의 사소한 의견입니다 (Chore)

Summary by CodeRabbit

  • 신규 기능

    • 특정 날짜까지 남은 시간을 일, 시간, 분 단위로 표시하는 기능이 추가되었습니다.
  • 버그 수정

    • 날짜 계산 유틸리티 클래스가 정리되어, 관련 기능이 일관되게 동작하도록 개선되었습니다.

@coderabbitai

coderabbitai Bot commented Jul 9, 2025

Copy link
Copy Markdown

Walkthrough

DateUtil 클래스에 formatAfterTime(LocalDate date) 메서드가 새로 추가되었고, 기존에 별도 파일로 존재하던 DateUtilsss 클래스는 삭제되었습니다. 관련된 레포지토리 구현체에서 해당 메서드의 호출도 새로운 위치로 변경되었습니다.

Changes

파일/경로 변경 요약
src/main/java/konkuk/thip/common/util/DateUtil.java formatAfterTime(LocalDate date) 정적 메서드 추가
src/main/java/konkuk/thip/common/util/DateUtilsss.java DateUtilsss 클래스 및 메서드 전체 삭제
src/main/java/konkuk/thip/room/adapter/out/persistence/RoomQueryRepositoryImpl.java DateUtilsssDateUtil로 import 및 메서드 호출부 수정

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant RoomQueryRepositoryImpl
    participant DateUtil

    Client->>RoomQueryRepositoryImpl: 날짜 관련 요청
    RoomQueryRepositoryImpl->>DateUtil: formatAfterTime(LocalDate)
    DateUtil-->>RoomQueryRepositoryImpl: 남은 시간 문자열 반환
    RoomQueryRepositoryImpl-->>Client: 결과 반환
Loading

Poem

🐇
날짜 계산, 깔끔하게
DateUtil 하나로 통일했네!
오래된 친구 DateUtilsss는 안녕,
새 메서드로 시간도 뚜렷하게!
남은 시간, 토끼도 알겠다네.
🕰️✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2025

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/konkuk/thip/common/util/DateUtil.java (1)

22-43: 새로운 메서드 추가가 적절하게 구현되었습니다.

formatAfterTime 메서드의 로직은 올바르게 구현되었습니다. 다만 몇 가지 개선사항을 제안드립니다:

  1. 과거 날짜 처리: 현재 "??" 반환값이 사용자에게 명확하지 않을 수 있습니다.
  2. 문자열 일관성: 반환 문자열에 공백이 포함되어 있는데, 기존 formatLastActivityTime 메서드와 일관성을 확인해주세요.
-        if (d.isNegative() || d.isZero()) {
-            return "??";
-        }
+        if (d.isNegative() || d.isZero()) {
+            return "마감됨";
+        }

그리고 반환 문자열에서 공백 제거를 고려해보세요:

-            return days + "일 뒤 ";
-            return hours + "시간 뒤 ";
-        return minutes + "분 뒤 ";
+            return days + "일 뒤";
+            return hours + "시간 뒤";
+        return minutes + "분 뒤";
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4c52bb and a241c40.

📒 Files selected for processing (3)
  • src/main/java/konkuk/thip/common/util/DateUtil.java (2 hunks)
  • src/main/java/konkuk/thip/common/util/DateUtilsss.java (0 hunks)
  • src/main/java/konkuk/thip/room/adapter/out/persistence/RoomQueryRepositoryImpl.java (2 hunks)
💤 Files with no reviewable changes (1)
  • src/main/java/konkuk/thip/common/util/DateUtilsss.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
src/main/java/konkuk/thip/room/adapter/out/persistence/RoomQueryRepositoryImpl.java (2)

11-11: import 문이 올바르게 업데이트되었습니다.

DateUtilsss에서 DateUtil로의 import 변경이 적절합니다.


99-99: 완료: DateUtilsss 참조 제거 확인됨

  • DateUtil.formatAfterTime 호출로 메서드 업데이트가 올바르게 적용되었습니다.
  • rgfd 검색 결과, Java 파일 내에 DateUtilsss 참조 및 파일이 더 이상 존재하지 않음을 확인했습니다.

@seongjunnoh seongjunnoh merged commit dc95f52 into develop Jul 9, 2025
3 checks passed
@seongjunnoh seongjunnoh deleted the feat/#55-room-search branch August 9, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant