-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: missionRecord -> mission startedAt으로 변경하여 sinceDay 계산 수정 #203
Conversation
long sinceDay = | ||
Duration.between(missionRecord.getMission().getStartedAt(), LocalDateTime.now()) | ||
.toDays() | ||
+ 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상단에 매직넘버 상수로 빼는게 좋을 것 같아용
private static final int DAYS_ADJUSTMENT = 1;
long sinceDay = | |
Duration.between(missionRecord.getMission().getStartedAt(), LocalDateTime.now()) | |
.toDays() | |
+ 1; | |
long sinceDay = | |
Duration.between(missionRecord.getMission().getStartedAt(), LocalDateTime.now()) | |
.toDays() + DAYS_ADJUSTMENT; |
또는
long sinceDay = | |
Duration.between(missionRecord.getMission().getStartedAt(), LocalDateTime.now()) | |
.toDays() | |
+ 1; | |
long sinceDay = | |
Duration.between(missionRecord.getMission().getStartedAt(), LocalDateTime.now().minusDays(DAYS_ADJUSTMENT)) | |
.toDays(); |
와 같이 처리할수도 있을 것 같네용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1번 내용으로 수정하겠습니당
|
🌱 관련 이슈
sinceDay
값이 항상 0일차로 나오는 문제 #201📌 작업 내용 및 특이사항
📝 참고사항
📚 기타