Skip to content

Conversation

@ghdtnals
Copy link
Collaborator

#️⃣연관된 이슈

ex) #이슈번호, #이슈번호

Closes #16

📝 PR 유형

해당하는 유형에 'x'로 체크해주세요.

  • 기능 추가 (Feature)
  • 버그 수정 (Bug Fix)
  • 코드 개선 (Refactoring)
  • 스타일 변경 (UI/UX)
  • 문서 작업 (Documentation)
  • 환경 설정 (Configuration)
  • 기타 (Other)

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

  • YYYY-MM-DD 형식의 날짜 문자열 반환 함수 구현 (formatDate)
  • HH:MM 형식의 24시간제 시간 문자열 반환 함수 구현 (formatTime)
  • 시작 시간 + 근무 시간 기준 시간 범위 문자열 생성 함수 구현 (formatTimeRange)
  • 시작/종료 시간을 기반으로 과거 여부 판단 함수 구현 (isPastDate)

스크린샷 (선택)

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

@ghdtnals ghdtnals added the Feature (기능 추가) 기능을 추가합니다. label Apr 23, 2025
@ghdtnals ghdtnals self-assigned this Apr 23, 2025
@github-actions github-actions bot requested a review from almighty55555 April 23, 2025 10:10
@netlify
Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for thejulge1 ready!

Name Link
🔨 Latest commit b7eddf7
🔍 Latest deploy log https://app.netlify.com/sites/thejulge1/deploys/6808f8d93d593000084eb614
😎 Deploy Preview https://deploy-preview-17--thejulge1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ghdtnals ghdtnals removed the request for review from almighty55555 April 23, 2025 10:11
Copy link
Collaborator

@jeonghwanJay jeonghwanJay left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 !

Copy link
Collaborator

@cozy-ito cozy-ito left a comment

Choose a reason for hiding this comment

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

늦게 리뷰 드려서 죄송합니다 🙇‍♂️
고생하셨습니다! 👍

// 시작 시간 + workhour 기준으로 endTime까지 포함한 시간 범위 문자열
export function formatTimeRange(startsAt: string, workhour: number): string {
const start = new Date(startsAt);
const end = new Date(start.getTime() + workhour * 3600000);
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. 매직넘버는 별도의 상수화를 통해서 그 의미를 전달하면 좋을 것 같습니다 🤔
const ONE_MINUTE = 3_600_000;
...

  const end = new Date(start.getTime() + workhour * ONE_MINUTE);
  1. 언더스코어(_)를 통해서 숫자 구분을 해도 좋을 것 같아요! 숫자 데이터와 동일하게 취급돼요! 😄 (ex: 3_600_000)

});
}
// 시작 시간 + workhour 기준으로 endTime까지 포함한 시간 범위 문자열
export function formatTimeRange(startsAt: string, workhour: number): string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

그냥 단순히 궁금한 부분입니다만,
startAt이 아니라 startsAt인가요..! 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

그리고 입력받는 startsAtstring타입이라면
전달 받아야 하는 특정 형태가 있을까요? 🤔 (ex: YYYY-MM-DD HH:mm 등)
있다면 JSDoc을 사용해서 어떤 형태로 전달 받아야 하는지에 대한 설명이 포함되면 좋겠어요! 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

api 리스폰스가 startsAt으로 오는 것 같아서 startsAt으로 지정하기는 했습니다..!😊

@ghdtnals ghdtnals merged commit d7a5afe into dev Apr 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature (기능 추가) 기능을 추가합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

날짜 커스텀 로직

4 participants