-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FEAT] task get api TargetArea 연동
- Loading branch information
Showing
4 changed files
with
50 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export interface GetTasksType { | ||
isTotal?: boolean; | ||
sortOrder?: string; | ||
targetDate?: Date; | ||
targetDate?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** Date 형식을 0000-00-00 형식 string 으로 반환합니다 */ | ||
const formatDatetoLocalDate = (date: Date | null) => { | ||
if (date) { | ||
const year = date.getFullYear(); | ||
const month = '0'.concat((date.getMonth() + 1).toString()).slice(-2); | ||
const day = '0'.concat(date.getDate().toString()).slice(-2); | ||
return `${year}-${month}-${day}`; | ||
} | ||
return ''; | ||
}; | ||
|
||
export default formatDatetoLocalDate; |