From 6b36f78ea5c9c24ce8f935d830ba3688ad5d82fc Mon Sep 17 00:00:00 2001 From: Yesol Choi Date: Mon, 26 May 2025 09:14:04 +0900 Subject: [PATCH] =?UTF-8?q?com=20:=20yyyy-mm-dd=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common/comfunc.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/utils/common/comfunc.ts diff --git a/src/utils/common/comfunc.ts b/src/utils/common/comfunc.ts new file mode 100644 index 0000000..d408232 --- /dev/null +++ b/src/utils/common/comfunc.ts @@ -0,0 +1,7 @@ +export function formatDate(date) { + const year = date.getFullYear() + const month = String(date.getMonth() + 1).padStart(2, '0') + // 월은 0부터 시작 + const day = String(date.getDate()).padStart(2, '0') + return `${year}-${month}-${day}` +} \ No newline at end of file