mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 06:43:39 +09:00
com : 문자열 날짜형식으로 변환 함수 추가
This commit is contained in:
@@ -41,3 +41,8 @@ export function formatCurrency(value) {
|
|||||||
const num = Number(value.toString().replace(/[^0-9.]/g, ''))
|
const num = Number(value.toString().replace(/[^0-9.]/g, ''))
|
||||||
return isNaN(num) ? '' : num.toLocaleString()
|
return isNaN(num) ? '' : num.toLocaleString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function formatDatefromStringDate(dateStr){
|
||||||
|
if (!dateStr) return ''
|
||||||
|
return dateStr.replace(/^(\d{4})(\d{2})(\d{2})$/, '$1-$2-$3')
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user