File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export default function ConcertHeaderBtn({
9696 // 공연 당일 확인
9797 const concertStart = getConcertStartDate ( concertDetail . startDate ) ;
9898 if ( isSameDay ( plannerDate , concertStart ) ) {
99- toast . error ( "공연 당일은 플래너를 생성할 수 없습니다." ) ;
99+ toast . error ( "오늘은 공연 시작일이므로 플래너를 생성할 수 없습니다." ) ;
100100 return ;
101101 }
102102
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ export default function QuickActionsSection({
126126 // 공연 당일 확인
127127 const concertStart = getConcertStartDate ( concertStartDate ! ) ;
128128 if ( isSameDay ( plannerDate , concertStart ) ) {
129- toast . error ( "공연 당일은 플래너를 생성할 수 없습니다." ) ;
129+ toast . error ( "오늘은 공연 시작일이므로 플래너를 생성할 수 없습니다." ) ;
130130 return ;
131131 }
132132
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ export default function PlannerCreate() {
159159 // 공연 당일 확인
160160 const concertStart = getConcertStartDate ( concertDetail ?. startDate || "" ) ;
161161 if ( isSameDay ( plannerDate , concertStart ) ) {
162- toast . error ( "공연 당일은 플래너를 생성할 수 없습니다." ) ;
162+ toast . error ( "오늘은 공연 시작일이므로 플래너를 생성할 수 없습니다." ) ;
163163 return ;
164164 }
165165
Original file line number Diff line number Diff line change 11// 날짜 비교 유틸 함수
22export const isSameDay = ( date1 : Date , date2 : Date ) => {
3+ // 한국 시간(KST)으로 오늘 날짜 가져오기
4+ const todayKST = new Date ( new Date ( ) . toLocaleString ( "en-US" , { timeZone : "Asia/Seoul" } ) ) ;
5+
36 return (
47 date1 . getFullYear ( ) === date2 . getFullYear ( ) &&
58 date1 . getMonth ( ) === date2 . getMonth ( ) &&
6- date1 . getDate ( ) === date2 . getDate ( )
9+ date1 . getDate ( ) === date2 . getDate ( ) &&
10+ date1 . getFullYear ( ) === todayKST . getFullYear ( ) &&
11+ date1 . getMonth ( ) === todayKST . getMonth ( ) &&
12+ date1 . getDate ( ) === todayKST . getDate ( )
713 ) ;
814} ;
915
You can’t perform that action at this time.
0 commit comments