From 15a710c279f68fa9ad74d9d8d21f6f02285fc3e4 Mon Sep 17 00:00:00 2001 From: Yesol Choi Date: Tue, 27 May 2025 09:31:17 +0900 Subject: [PATCH] =?UTF-8?q?com:=20=ED=8C=8C=EC=9D=BC=20=ED=83=80=EC=9E=85?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=9D=B4=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/common/comfunc.ts | 12 +++++++++++- src/utils/types.ts | 11 +++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/utils/common/comfunc.ts b/src/utils/common/comfunc.ts index 3a842f0..7a17542 100644 --- a/src/utils/common/comfunc.ts +++ b/src/utils/common/comfunc.ts @@ -1,4 +1,4 @@ -export function formatDate(date) { +export function formatDatefromObject(date) { const year = date.getFullYear() const month = String(date.getMonth() + 1).padStart(2, '0') // 월은 0부터 시작 @@ -6,6 +6,16 @@ export function formatDate(date) { return `${year}-${month}-${day}` } +export function formatDatefromString(dateStr) { + if (!dateStr) return '' + const date = new Date(dateStr) + return date.toLocaleDateString('ko-KR', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + }).replace(/\./g, '-').replace(/\s/g, '').replace(/-$/,'') +} + export function formatBizNum(num){ if (!num) return '' diff --git a/src/utils/types.ts b/src/utils/types.ts index 2947b76..39183d7 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -14,4 +14,15 @@ export type Person = { attend_sta_ymd: string attend_end_ymd: string gubun_cd: string +} + +export interface iPbAtt { + prcsNo: string + bizNo: string + fileOrd: number + logiFnm: string + physFnm: string + size: number + data: string + path: string } \ No newline at end of file