diff --git a/src/components/features/MeetingDetail/MeetingInfo.tsx b/src/components/features/MeetingDetail/MeetingInfo.tsx index 349db85..5448c00 100644 --- a/src/components/features/MeetingDetail/MeetingInfo.tsx +++ b/src/components/features/MeetingDetail/MeetingInfo.tsx @@ -4,6 +4,7 @@ import { queries } from '@/apis'; import { Chip } from '@/components/common/Chip'; import { FlexBox } from '@/components/common/FlexBox'; import { SpeechBubble } from '@/components/common/SpeechBubble'; +import { formatDate } from '@/utils/formatDate'; import { isPastDate } from '@/utils/isPastDate'; import { UuidProps } from './MeetingDetail.type'; @@ -24,7 +25,7 @@ export const MeetingInfo = ({ uuid }: UuidProps) => { {meetingData.meetingName} - {meetingData.meetingStartDate} - {meetingData.meetingEndDate} + {formatDate(meetingData.meetingStartDate)} - {formatDate(meetingData.meetingEndDate)} {/* TODO : 길이가 길어지는 경우 flex 조절 필요 */} diff --git a/src/utils/formatDate.ts b/src/utils/formatDate.ts new file mode 100644 index 0000000..09999b7 --- /dev/null +++ b/src/utils/formatDate.ts @@ -0,0 +1,7 @@ +import dayjs from 'dayjs'; + +export const formatDate = (dateString: string): string => { + const date = dayjs(dateString); + + return date.format('YYYY. MM. DD'); +};