Skip to content

Commit

Permalink
feat : Date YYYY. MM. DD 형식에 맞도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
keemsebin committed Oct 11, 2024
1 parent 1bfd904 commit 89a6bc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/features/MeetingDetail/MeetingInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -24,7 +25,7 @@ export const MeetingInfo = ({ uuid }: UuidProps) => {
{meetingData.meetingName}
</Head3>
<Body3 regularWeight color="WH">
{meetingData.meetingStartDate} - {meetingData.meetingEndDate}
{formatDate(meetingData.meetingStartDate)} - {formatDate(meetingData.meetingEndDate)}
</Body3>
<FlexBox alignItems="normal" width="73%" margin="20px 0 5px 0">
{/* TODO : 길이가 길어지는 경우 flex 조절 필요 */}
Expand Down
7 changes: 7 additions & 0 deletions src/utils/formatDate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import dayjs from 'dayjs';

export const formatDate = (dateString: string): string => {
const date = dayjs(dateString);

return date.format('YYYY. MM. DD');
};

0 comments on commit 89a6bc2

Please sign in to comment.