From 62cb9ce0b248d601ea3844ff2b0de62016f27a6c Mon Sep 17 00:00:00 2001 From: kmi0817 Date: Tue, 5 Dec 2023 15:41:27 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20createDaysList=EC=9D=98=20=EB=B0=98?= =?UTF-8?q?=ED=99=98=20=ED=98=95=EC=8B=9D=20=EB=B3=80=EA=B2=BD=205?= =?UTF-8?q?=ED=99=94=20=E2=86=92=2005=20=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BE/src/postings/postings.controller.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BE/src/postings/postings.controller.ts b/BE/src/postings/postings.controller.ts index 46931fd..81f2fe5 100644 --- a/BE/src/postings/postings.controller.ts +++ b/BE/src/postings/postings.controller.ts @@ -252,7 +252,10 @@ export class PostingsController { return Array.from({ length: days }, (_, index) => { const date = new Date(startDate); date.setDate(standardDate.getDate() + index); - return `${date.getDate()}${weekdays[date.getDay()]}`; + const stringDate = date.getDate().toString(); + return `${stringDate.length < 2 ? `0${stringDate}` : stringDate} ${ + weekdays[date.getDay()] + }`; }); } }