Skip to content

Commit

Permalink
fix: 오전 0시로 나오는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
HeeSeok-kim committed Dec 2, 2023
1 parent ebdf00a commit 4ee60d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/utils/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const convertTo12HourFormat = (time: string) => {

// 24시간 형식의 시간을 12시간 형식으로 변환합니다.
const ampm = hours >= 12 ? '오후' : '오전'
const convertHours = hours === 0 ? 12 : hours % 12
const convertHours = hours > 12 ? hours - 12 : hours
const timeFormat = `${ampm} ${convertHours}시`

// 변환된 시간을 "오후 2시 30분" 형식으로 반환합니다.
Expand Down

0 comments on commit 4ee60d9

Please sign in to comment.