Skip to content

fix: 날짜 포맷팅 수정 - #225#226

Merged
sjk4618 merged 4 commits into
devfrom
fix/#225
Jan 19, 2026
Merged

fix: 날짜 포맷팅 수정 - #225#226
sjk4618 merged 4 commits into
devfrom
fix/#225

Conversation

@sjk4618
Copy link
Copy Markdown
Member

@sjk4618 sjk4618 commented Jan 19, 2026

🔥Pull requests

⛳️ 작업한 브랜치

👷 작업한 내용

  • fix: event/ticket 날짜 포맷팅 변경

🚨 참고 사항

@sjk4618 sjk4618 self-assigned this Jan 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 19, 2026

📝 Walkthrough

Summary by CodeRabbit

  • 개선사항
    • 동일·다중 날짜에 대한 이벤트 날짜 범위 표기가 보다 일관되고 가독성 있게 개선되었습니다(예: "1월 19일 (월), 2026", "1월 26일 (월) – 1월 29일 (목), 2026").
    • 결제·티켓·이벤트 정보 전반에 걸쳐 통일된 날짜 표기 적용 및 날짜 처리 안정성 향상(입력 검증 추가).
  • 기타
    • 티켓 목록의 그룹화 및 출력 순서가 결정론적으로 개선되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

이 PR은 날짜 범위 포맷터 메서드명을 formatEventDate(...)에서 formatStartEndDate(...)로 추가·대체하고, 새 포맷팅 로직(연도/월/일 구분, EN_DASH 사용, 널 체크 등)을 도입한 뒤 EventService, PaymentService, TicketService의 관련 호출부를 해당 메서드로 교체했습니다.

Changes

Cohort / File(s) 요약
날짜 포맷터 유틸리티
src/main/java/com/permitseoul/permitserver/global/util/LocalDateTimeFormatterUtil.java
새 공용 메서드 formatStartEndDate(LocalDateTime, LocalDateTime) 추가. MONTH_DAY_FORMATTER, YEAR_FORMATTER, EN_DASH 상수 도입, 널 체크 및 연도/월/일별 범위 포맷 재구성. 기존 내부 포맷 로직 재정리.
서비스 호출부 변경 — 이벤트/결제
src/main/java/com/permitseoul/permitserver/domain/event/api/service/EventService.java, src/main/java/com/permitseoul/permitserver/domain/payment/api/service/PaymentService.java
LocalDateTimeFormatterUtil.formatEventDate(...) 호출을 formatStartEndDate(...)로 교체. EventService에서 미사용 import 제거. 호출 시 입력/출력 시그니처 변경 없음.
서비스 호출부 변경 — 티켓
src/main/java/com/permitseoul/permitserver/domain/ticket/api/service/TicketService.java
다수 코드 경로에서 포맷 호출을 formatStartEndDate(...)로 교체. 주문 그룹화 로직을 LinkedHashMap(역순 createdAt 기준)으로 변경하고, 불필요한 최종 정렬 제거. 변수명·줄바꿈·스타일 경미 변경(기능적 변화 없음).
스타일/포맷팅 미세조정
src/main/java/com/permitseoul/permitserver/domain/ticket/api/service/...
여러 위치에서 체인 호출 줄바꿈, 변수명 소소한 수정 및 예외/캐치 블록 공백 조정 등 코드 스타일 정리.

Sequence Diagram(s)

(생성 조건 미충족 — 생략)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 19.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 날짜 포맷팅 수정이라는 주요 변경 사항을 명확하게 설명하고 있으며, 링크된 이슈 #225와도 일치합니다.
Description check ✅ Passed PR 설명은 event/ticket 날짜 포맷팅 변경 작업과 관련이 있으며, 해결하려는 이슈(#225)를 명시하고 있습니다.
Linked Issues check ✅ Passed 코드 변경 사항(LocalDateTimeFormatterUtil에 formatStartEndDate 메서드 추가, 서비스들에서 날짜 포맷팅 메서드 변경)이 이슈 #225의 event/ticket 날짜 포맷팅 변경 요구사항을 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 날짜 포맷팅 관련 작업으로 일관되어 있으며, 이슈 #225의 범위 내에 있습니다. 추가적인 비관련 변경은 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@src/main/java/com/permitseoul/permitserver/global/util/LocalDateTimeFormatterUtil.java`:
- Around line 16-17: There is a stray orphan fragment causing a syntax error
after the DAY_FORMATTER declaration; either remove the leftover
"Locale.ENGLISH); // May 2025" fragment entirely or restore the intended
MONTH_YEAR_FORMATTER declaration (e.g., define MONTH_YEAR_FORMATTER =
DateTimeFormatter.ofPattern("MMM yyyy", Locale.ENGLISH)) so the class compiles;
update the code around DAY_FORMATTER and MONTH_YEAR_FORMATTER to ensure every
DateTimeFormatter declaration is a complete, valid statement.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@src/main/java/com/permitseoul/permitserver/global/util/LocalDateTimeFormatterUtil.java`:
- Around line 27-53: The method formatStartEndDate currently dereferences
startDate and endDate which can cause NullPointerException; update
formatStartEndDate to validate inputs at the start (e.g., call
Objects.requireNonNull(startDate, "startDate must not be null") and
Objects.requireNonNull(endDate, "endDate must not be null")) or annotate
parameters with `@NonNull` and add equivalent validation, so the method fails fast
with clear messages instead of throwing NPEs later; reference the
formatStartEndDate method and the startDate/endDate parameters when applying the
change.
♻️ Duplicate comments (1)
src/main/java/com/permitseoul/permitserver/global/util/LocalDateTimeFormatterUtil.java (1)

16-25: LGTM! 이전 컴파일 오류가 해결되었습니다.

포맷터 상수들이 올바르게 선언되었으며, 이전 리뷰에서 지적된 고아 코드 조각 문제가 수정되었습니다. EN_DASH에 유니코드 en-dash (U+2013)를 사용한 것은 타이포그래피적으로 올바른 선택입니다.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@src/main/java/com/permitseoul/permitserver/global/util/LocalDateTimeFormatterUtil.java`:
- Around line 28-58: formatStartEndDate currently always uses endDate's year
(variable year) which mislabels ranges spanning years; compute startYear and
endYear via startDate.format(YEAR_FORMATTER) and endDate.format(YEAR_FORMATTER)
and branch: if startDate.toLocalDate().equals(endDate.toLocalDate()) keep the
existing single-year formatting (use either year), else if
startYear.equals(endYear) keep the current behavior (append one year at the
end), otherwise when years differ append the startYear after startMonthDay and
the endYear after endMonthDay (e.g., "Jan 31, 2025 – Jan 1, 2026") using the
existing MONTH_DAY_FORMATTER, DAY_FORMATTER, COMMA_AND_SPACE and EN_DASH symbols
in LocalDateTimeFormatterUtil.formatStartEndDate.

@sjk4618 sjk4618 merged commit 41e4b3d into dev Jan 19, 2026
2 checks passed
@sjk4618 sjk4618 deleted the fix/#225 branch January 19, 2026 15:17
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.

fix: event/ticket 날짜 포맷팅 변경

1 participant