com: 파일 타입 추가 및 공통 함수 이름 수정

This commit is contained in:
Yesol Choi
2025-05-27 09:31:17 +09:00
parent e883c0ef45
commit 15a710c279
2 changed files with 22 additions and 1 deletions

View File

@@ -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 ''

View File

@@ -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
}