mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 04:22:25 +09:00
com : 문자열 날짜형식으로 변환 함수 추가
This commit is contained in:
@@ -40,4 +40,9 @@ export function formatCurrency(value) {
|
||||
if (value === null || value === undefined || value === '') return ''
|
||||
const num = Number(value.toString().replace(/[^0-9.]/g, ''))
|
||||
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