[Feature] 랭킹 조회를 위한 WeekNumberCalculator 구현 #175
+129
−31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolved #174
AS-IS
기존 랭킹을 불러오는 로직은 아래와 같습니다.
weekNumber
를 받는다weekNumber
를 서버에 보내 랭킹 정보를 받는다weekNumber
에 +-1 를 해주어 이동한다.해당 로직에는 2가지 문제점이 있습니다.
TO-BE
weekNumber
를 계산하는WeekNumberCalculator
를 구현하였습니다.WeekNumberCalculator
Test 코드도 작성하였습니다.WeekNumberCalculator
weekNumber를 구분하는 기준(ISO기준)은 아래와 같습니다.
예상 문제점
KEY-POINT
SCREENSHOT (Optional)
Screen_recording_20250227_174016.mp4