Skip to content

Commit

Permalink
refactor: add comments in util function
Browse files Browse the repository at this point in the history
  • Loading branch information
ballsona committed Aug 29, 2023
1 parent ea6a37b commit 9d06e5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function getMonthAndDay(date: Date) {
}

/**
* date를 `<input type="datetieme-local" />`의 value로 사용하기 위한 함수
* @returns `YYYY-MM-DDThh:mm:ss`
*/
export function getDateTimeLocalString(date: Date) {
Expand All @@ -61,7 +62,10 @@ export function getDateTimeLocalString(date: Date) {
return localDate.toISOString().split('.')[0];
}

/** 2개의 날짜가 같은 날짜인지 확인하는 함수 */
/**
* 2개의 날짜가 같은 날짜인지 확인하는 함수
* @returns 두 날짜가 같은 날짜인지 여부 boolean
*/
export function isSameDate(date1: Date, date2: Date) {
return (
date1.getFullYear() === date2.getFullYear() &&
Expand Down

0 comments on commit 9d06e5b

Please sign in to comment.