Skip to content

Commit

Permalink
refactor(useTimeRangeDropdown): 유틸함수 반환 문자열 + 대신 백틱(``)으로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Largopie committed Sep 5, 2024
1 parent 973379a commit 2fa977d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ export function isTimeSelectable(startTime: string, endTime: string) {
return true;
}

// 현재 시간에서 1시간 더한 시간을 반화해주는 함수(@낙타)
// 현재 시간에서 1시간 더한 시간을 반환해주는 함수(@낙타)
export function addHoursToCurrentTime(currentTime: string, hours: number) {
const [currentHours, currentMinutes] = currentTime.split(':').map(Number);

return (
String(currentHours + hours).padStart(2, '0') + ':' + String(currentMinutes).padStart(2, '0')
);
return `${String(currentHours + hours).padStart(2, '0')}:${String(currentMinutes).padStart(2, '0')}`;
}

0 comments on commit 2fa977d

Please sign in to comment.